6.8Built-in Content Converters

Updated on Aug 20, 2026~6 min read
  • StringContentConverter content converter

When the target receiving type is a string, StringContentConverter is used to convert the HttpResponseMessage object into a string. Internally, this conversion calls the ReadAsStringAsync method provided by HttpResponseMessage.Content.


  • StreamContentConverter content converter

When the target receiving type is Stream, StreamContentConverter is used to convert the HttpResponseMessage object into a Stream. Internally, this conversion calls the ReadAsStreamAsync method provided by HttpResponseMessage.Content.


  • ByteArrayContentConverter content converter

When the target receiving type is a byte array, ByteArrayContentConverter is used to convert the HttpResponseMessage object into a byte array. Internally, this conversion calls the ReadAsByteArrayAsync method provided by HttpResponseMessage.Content.


  • HttpResponseMessageConverter content converter

When the target receiving type is HttpResponseMessage, HttpResponseMessageConverter is used to return the HttpResponseMessage object directly.


  • VoidContentConverter content converter

When the target receiving type is void or VoidContent, VoidContentConverter is used to return a null value (no return value).


  • IActionResultContentConverter content converter

When the target receiving type is IActionResult, IActionResultContentConverter is used to convert the HttpResponseMessage object into IActionResultContentConverter.


  • AsyncEnumerableContentConverter<T> content converter

When the target receiving type is IAsyncEnumerable<T>, AsyncEnumerableContentConverter<T> is used to convert the HttpResponseMessage object into IAsyncEnumerable<T>. Internally, this conversion calls the ReadFromJsonAsAsyncEnumerable method provided by HttpResponseMessage.Content.


  • HttpRemoteResult<T> content converter

When the target receiving type is HttpRemoteResult<T>, HttpRemoteResultContentConverter<T> is used to convert the HttpResponseMessage object into HttpRemoteResult<T>. Internally, this conversion calls the ReadAsync method provided by IHttpContentConverterFactory.


  • ObjectContentConverter content converter

When the target receiving type is not a specific type — for example custom types, primitive data types (such as int, bool, and so on), and various other types — ObjectContentConverter is used to convert the HttpResponseMessage object into the target receiving type. Internally, this conversion calls the ReadFromJsonAsync method provided by HttpResponseMessage.Content.