* Add an UnsupportedContentType to the ModelState dictionary when no formatter can read the body. * Add a filter to the pipeline that searches for that specific exception and transforms the response into 415. |
||
|---|---|---|
| .. | ||
| Controllers | ||
| Filters | ||
| Models | ||
| wwwroot | ||
| FormatterWebSite.xproj | ||
| Startup.cs | ||
| StringInputFormatter.cs | ||
| ValidateBodyParameterAttribute.cs | ||
| hosting.json | ||
| project.json | ||
| readme.md | ||
readme.md
FormatterWebSite
This web site illustrates how to input formatters operate on the request body. It also demonstrates how custom options can be set for model validation.