FormatterMappings.SetMediaTypeMappingForFormat Method

Definition

Overloads

SetMediaTypeMappingForFormat(String, MediaTypeHeaderValue)

Sets mapping for the format to specified media type. If the format already exists, the media type will be overwritten with the new value.

SetMediaTypeMappingForFormat(String, String)

Sets mapping for the format to specified media type. If the format already exists, the media type will be overwritten with the new value.

SetMediaTypeMappingForFormat(String, MediaTypeHeaderValue)

Source:
FormatterMappings.cs
Source:
FormatterMappings.cs

Sets mapping for the format to specified media type. If the format already exists, the media type will be overwritten with the new value.

public:
 void SetMediaTypeMappingForFormat(System::String ^ format, Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ contentType);
public void SetMediaTypeMappingForFormat (string format, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType);
member this.SetMediaTypeMappingForFormat : string * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> unit
Public Sub SetMediaTypeMappingForFormat (format As String, contentType As MediaTypeHeaderValue)

Parameters

format
String

The format value.

contentType
MediaTypeHeaderValue

The media type for the format value.

Applies to

SetMediaTypeMappingForFormat(String, String)

Source:
FormatterMappings.cs
Source:
FormatterMappings.cs

Sets mapping for the format to specified media type. If the format already exists, the media type will be overwritten with the new value.

public:
 void SetMediaTypeMappingForFormat(System::String ^ format, System::String ^ contentType);
public void SetMediaTypeMappingForFormat (string format, string contentType);
member this.SetMediaTypeMappingForFormat : string * string -> unit
Public Sub SetMediaTypeMappingForFormat (format As String, contentType As String)

Parameters

format
String

The format value.

contentType
String

The media type for the format value.

Applies to