XmlHttpRequestHeaderMapping.TryMatchMediaType Method
Returns a value indicating whether the current RequestHeaderMapping instance can return a MediaTypeHeaderValue from request.
Namespace: System.Net.Http.Formatting
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public Overrides Function TryMatchMediaType ( _
request As HttpRequestMessage _
) As Double
'Usage
Dim instance As XmlHttpRequestHeaderMapping
Dim request As HttpRequestMessage
Dim returnValue As Double
returnValue = instance.TryMatchMediaType(request)
public override double TryMatchMediaType(
HttpRequestMessage request
)
public:
virtual double TryMatchMediaType(
HttpRequestMessage^ request
) override
abstract TryMatchMediaType :
request:HttpRequestMessage -> float
override TryMatchMediaType :
request:HttpRequestMessage -> float
public override function TryMatchMediaType(
request : HttpRequestMessage
) : double
Parameters
request
Type: HttpRequestMessageThe HttpRequestMessage to check.
Return Value
Type: System.Double
The quality of the match. A value of 0.0 signifies no match. A value of 1.0 signifies a complete match and that the request was made using XmlHttpRequest without an Accept header.