FormatterMappings.SetMediaTypeMappingForFormat Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
- 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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for