HttpClientConfig.RequestHeaderEncoding Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Allows overriding the default (ASCII) encoding for outgoing request headers.
Setting this value will in turn set RequestHeaderEncodingSelector and use the selected encoding for all request headers. The value is then parsed by GetEncoding(String), so use values like: "utf-8", "iso-8859-1", etc.
public string? RequestHeaderEncoding { get; init; }
member this.RequestHeaderEncoding : string with get, set
Public Property RequestHeaderEncoding As String
Property Value
Remarks
Note: If you're using an encoding other than UTF-8 here, then you may also need to configure your server to accept request headers with such an encoding via the corresponding options for the server.
For example, when using Kestrel as the server, use RequestHeaderEncodingSelector to configure Kestrel to use the same encoding.