예제 #1
0
 private void InsertSoapEnvelopeIntoWebRequest(XDocument soapEnvelopeXml)
 {
     using (var stream = WebRequestSource.GetRequestStream())
     {
         soapEnvelopeXml.Save(stream);
     }
 }
예제 #2
0
        public HttpResponse PostRequest(string data, string contentType)
        {
            WebRequestSource.Method = "POST";

            WebRequestSource.ContentType = contentType;
            using (var dataStream = new StreamWriter(WebRequestSource.GetRequestStream()))
            {
                dataStream.Write(data);
                dataStream.Flush();
            }

            return(Request());
        }