zaterdag 9 augustus 2014

Accepting Raw Request Body Content with ASP.NET Web API

One ASP.NET Web API related question that frequently comes up frequently is how to capture the raw request content to a simple parameter on a controller method. Turns out that’s not as easy as it should be. In this post I discuss how to natively capture the raw request content and then create a [NakedBody] attribute that makes it easy capture the raw content in a string or byte[] parameter.






Accepting Raw Request Body Content with ASP.NET Web API

Geen opmerkingen:

Een reactie posten