Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- byte[] requestBytes = System.Text.Encoding.ASCII.GetBytes(xml);
- req.Method = "POST";
- req.ContentType = "text/xml; encoding='utf-8'";
- req.ContentLength = requestBytes.Length;
- Stream requestStream = req.GetRequestStream();
- requestStream.Write(requestBytes, 0, requestBytes.Length);
- requestStream.Close();
- **HttpWebResponse res = (HttpWebResponse)req.GetResponse();**
- StreamReader sr = new StreamReader(res.GetResponseStream(), System.Text.Encoding.Default);
- string backstr = sr.ReadToEnd();
- sr.Close();
- res.Close();
Add Comment
Please, Sign In to add comment