DefaultContentNegotiator.SelectResponseCharacterEncoding Method
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)
Syntax
'Declaration
Protected Overridable Function SelectResponseCharacterEncoding ( _
request As HttpRequestMessage, _
formatter As MediaTypeFormatter _
) As Encoding
'Usage
Dim request As HttpRequestMessage
Dim formatter As MediaTypeFormatter
Dim returnValue As Encoding
returnValue = Me.SelectResponseCharacterEncoding(request, _
formatter)
protected virtual Encoding SelectResponseCharacterEncoding(
HttpRequestMessage request,
MediaTypeFormatter formatter
)
protected:
virtual Encoding^ SelectResponseCharacterEncoding(
HttpRequestMessage^ request,
MediaTypeFormatter^ formatter
)
abstract SelectResponseCharacterEncoding :
request:HttpRequestMessage *
formatter:MediaTypeFormatter -> Encoding
override SelectResponseCharacterEncoding :
request:HttpRequestMessage *
formatter:MediaTypeFormatter -> Encoding
protected function SelectResponseCharacterEncoding(
request : HttpRequestMessage,
formatter : MediaTypeFormatter
) : Encoding
Parameters
request
Type: HttpRequestMessageThe request.
formatter
Type: System.Net.Http.Formatting.MediaTypeFormatterThe selected media formatter.
Return Value
Type: System.Text.Encoding
Returns the Encoding that is the best match.