Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaTypeFormatter.SelectCharacterEncoding Method (HttpContentHeaders)

 

Determines the best character encoding for reading or writing an HTTP entity body, given a set of content headers.

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

public Encoding SelectCharacterEncoding(
	HttpContentHeaders contentHeaders
)

Parameters

contentHeaders
Type: System.Net.Http.Headers.HttpContentHeaders

The content headers.

Return Value

Type: System.Text.Encoding

The encoding that is the best match.

Return to top
Show: