Hi,
Using the current HTTP Context, how can I see the content of the current POST request that has just been posted to the server?
Hi,
Using the current HTTP Context, how can I see the content of the current POST request that has just been posted to the server?
HttpContext.Current.Request.Form is a collection of name value pairs for posted content. I assume this is what you want rather than the raw post data...
Edit to add: My curiosity piqued I decided to go look for the raw post data. It seems there is a .InputStream property on the request object that "Gets the contents of the incoming HTTP entity body". I suspect this will be the raw data.
the firebug extension of firefox lets you see exactly what is posted to the server. not sure if that's helpful to you or not.
If you're speaking from a test/eval perspective. Use Fiddler. Assuming your WCF isnt doing anythign too fancy/non-standard, you can see the content of the request/response bodies.
Now from a code perspective, you'd need to access the Post content and parse through it as has been mentioned