DefaultContentNegotiator.SelectResponseCharacterEncoding Method (HttpRequestMessage, MediaTypeFormatter)

 

Determines the best character encoding for writing the response.

Namespace:   System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

protected virtual Encoding SelectResponseCharacterEncoding(
	HttpRequestMessage request,
	MediaTypeFormatter formatter
)

Parameters

request
Type: System.Net.Http.HttpRequestMessage

The request.

formatter
Type: System.Net.Http.Formatting.MediaTypeFormatter

The selected media formatter.

Return Value

Type: System.Text.Encoding

Returns the Encoding that is the best match.

Return to top
Show: