I have created a c# web page which will be listening for POST data from a service. I've seen that I may need to use Request.GetBufferlessInputStream() which will read in the page data. I will then process this data further in my code.
However, I cannot get the post data! I have found that I need to use
Stream httpStream = Request.GetBufferlessInputStream();
curl -H "Content Type: application/xml" -d "<callback var=\"matt\">" -X POST http://localhost:1111/Default.aspx
This is what you need-
Stream stream = Request.InputStream; StreamReader reader = new StreamReader(stream, Request.ContentEncoding); string text = reader.ReadToEnd();