Exemple #1
0
 private void InsertSoapEnvelopeIntoWebRequest(XDocument soapEnvelopeXml)
 {
     using (var stream = WebRequestSource.GetRequestStream())
     {
         soapEnvelopeXml.Save(stream);
     }
 }
Exemple #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());
        }