I\'m developing a web page that needs to take an HTTP Post Request and read it into a byte array for further processing. I\'m kind of stuck on how to do this, and I\'m stumped
I use MemoryStream
and Response.GetResponseStream().CopyTo(stream)
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
myRequest.Method = "GET";
WebResponse myResponse = myRequest.GetResponse();
MemoryStream ms = new MemoryStream();
myResponse.GetResponseStream().CopyTo(ms);
byte[] data = ms.ToArray();