RawRequestBodyFormatter Class
Formatter that allows content of type text/plain and application/octet stream or no content type to be parsed to raw data. Allows for a single input parameter in the form of:
public string RawString([FromBody] string data) (text/plain) public byte[] RawData([FromBody] byte[] data) (application/octet-stream)
Add to MVC processing with:
services.AddMvc(o ⇒ o.InputFormatters.Insert(0, new RawRequestBodyFormatter()));
Class Members
Member | Description | |
---|---|---|
![]() |
Constructor | |
![]() |
CanRead | Allow text/plain, application/octet-stream and no content type tobe processed
public bool CanRead(InputFormatterContext context)
|
![]() |
ReadRequestBodyAsync | Handle text/plain or no content type for string resultsHandle application/octet-stream for byte[] results
public Task
|
Assembly: Westwind.AspNetCore.dll
© West Wind Technologies, 2025 • Updated: 2025-03-08
Comment or report problem with topic