System.Net.Tests.HttpWebRequestTest.BeginGetRequestStream_UseCONNECTVerb_ThrowsProtocolViolationException C# (CSharp) Method

BeginGetRequestStream_UseCONNECTVerb_ThrowsProtocolViolationException() private method

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