Export (0) Print
Expand All

MediaTypeFormatterMatchRanking Enumeration

Contains information about the degree to which a MediaTypeFormatter matches the explicit or implicit preferences found in an incoming request.

Namespace:  System.Net.Http.Formatting
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

public enum MediaTypeFormatterMatchRanking

Member nameDescription
None No match was found

MatchOnCanWriteType Matched on a type, meaning that the formatter is able to serialize the type.

MatchOnRequestAcceptHeaderLiteralMatched on an explicit literal accept header, such as “application/json”.
MatchOnRequestAcceptHeaderSubtypeMediaRangeMatched on an explicit subtype range in an Accept header, such as “application/*”.
MatchOnRequestAcceptHeaderAllMediaRangeMatched on an explicit “*/*” range in the Accept header.
MatchOnRequestWithMediaTypeMapping Matched on HttpRequestMessage after having applied the various MediaTypeMappings.

MatchOnRequestMediaType Matched on the media type of the entity body in the HTTP request message.

Show:
© 2014 Microsoft