Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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 M:HttpRequestMessage.Headers for a match. It does not check header fields associated with M:HttpResponseMessage.Headers or M:HttpContent.Headers instances.</remarks>
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Inheritance Hierarchy
System.Object
System.Net.Http.Formatting.MediaTypeMapping
System.Net.Http.Formatting.RequestHeaderMapping
System.Net.Http.Formatting.XmlHttpRequestHeaderMapping
Syntax
public class RequestHeaderMapping : MediaTypeMapping
public ref class RequestHeaderMapping : MediaTypeMapping
type RequestHeaderMapping =
class
inherit MediaTypeMapping
end
Public Class RequestHeaderMapping
Inherits MediaTypeMapping
Constructors
Name | Description | |
---|---|---|
![]() |
RequestHeaderMapping(String, String, StringComparison, Boolean, MediaTypeHeaderValue) | Initializes a new instance of the RequestHeaderMapping class. |
![]() |
RequestHeaderMapping(String, String, StringComparison, Boolean, String) | Initializes a new instance of the RequestHeaderMapping class. |
Properties
Name | Description | |
---|---|---|
![]() |
HeaderName | Gets the name of the header to match. |
![]() |
HeaderValue | Gets the header value to match. |
![]() |
HeaderValueComparison | Gets the StringComparison to use when matching M:HeaderValue. |
![]() |
IsValueSubstring | Gets a value indicating whether M:HeaderValue is a matched as a substring of the actual header value. this instance is value substring. |
![]() |
MediaType | Gets the MediaTypeHeaderValue that is associated with HttpRequestMessage or HttpResponseMessage instances that have the given characteristics of the MediaTypeMapping. (Inherited from MediaTypeMapping.) |
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | (Inherited from Object.) |
![]() |
Finalize() | (Inherited from Object.) |
![]() |
GetHashCode() | (Inherited from Object.) |
![]() |
GetType() | (Inherited from Object.) |
![]() |
MemberwiseClone() | (Inherited from Object.) |
![]() |
ToString() | (Inherited from Object.) |
![]() |
TryMatchMediaType(HttpRequestMessage) | Returns a value indicating whether the current RequestHeaderMapping instance can return a MediaTypeHeaderValue from request. (Overrides MediaTypeMapping.TryMatchMediaType(HttpRequestMessage).) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
System.Net.Http.Formatting Namespace
Return to top