MediaTypeFormatterExtensions.AddUriPathExtensionMapping Method (MediaTypeFormatter, String, String)
Updates the given formatter's set of MediaTypeMapping elements so that it associates the mediaType with Uris ending with the given uriPathExtension.
Namespace: System.Net.Http.Formatting
Assembly: System.Web.Http (in System.Web.Http.dll)
public static void AddUriPathExtensionMapping( this MediaTypeFormatter formatter, string uriPathExtension, string mediaType )
Parameters
- formatter
- Type: System.Net.Http.Formatting.MediaTypeFormatter
The MediaTypeFormatter to receive the new UriPathExtensionMapping item.
- uriPathExtension
- Type: System.String
The string of the Uri path extension.
- mediaType
- Type: System.String
The string media type to associate with Uris ending with uriPathExtension.