6.2Built-in Content Processors

Updated on Aug 20, 2026~12 min read
  • StringContentProcessor Content Processor

When the raw request content satisfies the following conditions, StringContentProcessor is used to build a StringContent instance:

  • The raw request content is StringContent or JsonContent.
  • The content type includes application/json, application/json-patch+json, application/xml, application/xml-patch+xml, text/xml, text/html, text/plain, and application/soap+xml, and it still applies even when a charset character set is appended to these types (for example application/json; charset=utf-8).

  • StreamContentProcessor Content Processor

When the raw request content satisfies the following conditions, StreamContentProcessor is used to build a StreamContent instance:

  • The raw request content is StreamContent or Stream.

  • ByteArrayContentProcessor Content Processor

When the raw request content satisfies the following conditions, ByteArrayContentProcessor is used to build a ByteArrayContent instance:

  • The raw request content is ByteArrayContent or byte[], and is not FormUrlEncodedContent or StringContent.

  • FormUrlEncodedContentProcessor Content Processor

When the raw request content satisfies the following conditions, FormUrlEncodedContentProcessor is used to build a FormUrlEncodedContent instance:

  • The raw request content is FormUrlEncodedContent or a URL-encoded string.
  • The content type is application/x-www-form-urlencoded, and it still applies even when a charset character set is appended to the type (for example application/x-www-form-urlencoded; charset=utf-8).

  • StringContentForFormUrlEncodedContentProcessor Content Processor

When the raw request content satisfies the following conditions, StringContentForFormUrlEncodedContentProcessor is used to build a StringContent instance with content type application/x-www-form-urlencoded:

  • The raw request content is FormUrlEncodedContent or a URL-encoded string.
  • The content type is application/x-www-form-urlencoded, and it still applies even when a charset character set is appended to the type (for example application/x-www-form-urlencoded; charset=utf-8).
  • The useStringContent parameter or the UseStringContent property is true.

StringContentForFormUrlEncodedContentProcessor derives from FormUrlEncodedContentProcessor.


  • ReadOnlyMemoryContentProcessor Content Processor

When the raw request content satisfies the following conditions, ReadOnlyMemoryContentProcessor is used to build a ReadOnlyMemoryContent instance:

  • The raw request content is ReadOnlyMemoryContent or ReadOnlyMemory<byte>.

  • MultipartFormDataContentProcessor Content Processor

When the raw request content satisfies the following conditions, MultipartFormDataContentProcessor is used to build a MultipartFormDataContent instance:

  • The raw request content is MultipartFormDataContent.
  • The content type is multipart/form-data, and it still applies even when a charset character set is appended to the type (for example multipart/form-data; charset=utf-8).

  • MessagePackContentProcessor Content Processor

When the raw request content satisfies the following conditions, MessagePackContentProcessor is used to build a ByteArrayContent instance:

  • The content type is application/msgpack, and it still applies even when a charset character set is appended to the type (for example application/msgpack; charset=utf-8).

  • JsonLinesContentProcessor Content Processor

When the raw request content satisfies the following conditions, JsonLinesContentProcessor is used to build a StringContent instance:

  • The content type includes application/x-ndjson, application/x-jsonlines, application/jsonlines, and application/jsonl, and it still applies even when a charset character set is appended to the type (for example application/x-ndjson; charset=utf-8).

  • FileInfoContentProcessor Content Processor

When the raw request content satisfies the following conditions, FileInfoContentProcessor is used to build a StreamContent instance:

  • The raw request content is FileInfo.

  • FormFileContentProcessor Content Processor

When the raw request content satisfies the following conditions, FormFileContentProcessor is used to build a StreamContent instance:

  • The raw request content is IFormFile.