Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpWebRequest handler = (HttpWebRequest)WebRequest.Create("someUrl");
- handler.Method = "POST";
- string postData = "some data";
- byte[] data = Encoding.ASCII.GetBytes(postData);
- handler.ContentLength = data.Length;
- using (var stream = handler.GetRequestStream())
- {
- stream.Write(data, 0, data.Length);
- }
- handler.ContentType = "application/xml; charset=utf-8";
- HttpWebResponse response = (HttpWebResponse)handler.GetResponse();
- <security mode="Transport"/>
Add Comment
Please, Sign In to add comment