Quantcast
Channel: Rick Strahl's Web Log
Viewing all articles
Browse latest Browse all 664

Accepting Raw Request Body Content in ASP.NET Core API Controllers

$
0
0
When posting raw body content to ASP.NET Core the process is not very self-explanatory. There's no easy way to simply retrieve raw data to a parameter in an API method, so a few extra steps are provided using either manual handling of the raw request stream, or by creating custom formatter that can handle common 'raw' content types in your APIs via standard Controller method parameters. In this post I look at various permutations and how you can access the raw data in your code.

Viewing all articles
Browse latest Browse all 664

Trending Articles