System.Net.Tests.HttpWebRequestTest.BeginGetRequestStream_UseCONNECTVerb_ThrowsProtocolViolationException C# (CSharp) 메소드

BeginGetRequestStream_UseCONNECTVerb_ThrowsProtocolViolationException() 개인적인 메소드

private BeginGetRequestStream_UseCONNECTVerb_ThrowsProtocolViolationException ( Uri remoteServer ) : void
remoteServer Uri
리턴 void
        public void BeginGetRequestStream_UseCONNECTVerb_ThrowsProtocolViolationException(Uri remoteServer)
        {
            HttpWebRequest request = WebRequest.CreateHttp(remoteServer);
            request.Method = "CONNECT";
            Assert.Throws<ProtocolViolationException>(() =>
            {
                request.BeginGetRequestStream(null, null);
            });
        }
HttpWebRequestTest