<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="6.0.0-preview1" />

RequestHeaderMapping

This class provides a mapping from an arbitrary HTTP request header field to a MediaTypeHeaderValue used to select MediaTypeFormatter instances for handling the entity body of an HttpRequestMessage or HttpResponseMessage. <remarks>This class only checks header fields associated with Headers for a match. It does not check header fields associated with Headers or Headers instances.</remarks>
public string HeaderName { get; }

Gets the name of the header to match.

public string HeaderValue { get; }

Gets the header value to match.

Gets the StringComparison to use when matching HeaderValue.

public bool IsValueSubstring { get; }

Gets a value indicating whether HeaderValue is a matched as a substring of the actual header value. this instance is value substring.

public RequestHeaderMapping(string headerName, string headerValue, StringComparison valueComparison, bool isValueSubstring, string mediaType)

Initializes a new instance of the RequestHeaderMapping class.

public RequestHeaderMapping(string headerName, string headerValue, StringComparison valueComparison, bool isValueSubstring, MediaTypeHeaderValue mediaType)

Initializes a new instance of the RequestHeaderMapping class.