Table of Contents

GetEncoding Method

Definition

GetEncoding(HttpRequest)

Resolves the character encoding for the HTTP response by inspecting the Accept-Charset header of the request, falling back to GetDefaultEncoding() when no valid charset is indicated.

public virtual Encoding GetEncoding(HttpRequest request)

Parameters

request HttpRequest

The current HttpRequest.

Returns

Encoding

The Encoding to use when writing the response body.