Compartilhar via


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: HttpRequestMessage

    The request.

Return Value

Type: System.Text.Encoding
Returns the Encoding that is the best match.

See Also

Reference

DefaultContentNegotiator Class

System.Net.Http.Formatting Namespace