HttpMediaTypeHeaderValue HttpMediaTypeHeaderValue HttpMediaTypeHeaderValue HttpMediaTypeHeaderValue HttpMediaTypeHeaderValue Class

Definition

Represents the value of the Content-Type HTTP header on the HTTP content in a request or a response.

public : sealed class HttpMediaTypeHeaderValue : IStringable
struct winrt::Windows::Web::Http::Headers::HttpMediaTypeHeaderValue : IStringable
public sealed class HttpMediaTypeHeaderValue : IStringable
Public NotInheritable Class HttpMediaTypeHeaderValue Implements IStringable
var httpMediaTypeHeaderValue = new httpMediaTypeHeaderValue(mediaType);
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The HttpMediaTypeHeaderValue class represents the value of the Content-Type HTTP header on HTTP content sent in an HTTP request or received in an HTTP response.

The ContentType property on the HttpContentHeaderCollection returns an HttpMediaTypeHeaderValue object.

Constructors

HttpMediaTypeHeaderValue(String) HttpMediaTypeHeaderValue(String) HttpMediaTypeHeaderValue(String) HttpMediaTypeHeaderValue(String) HttpMediaTypeHeaderValue(String)

Initializes a new instance of the HttpMediaTypeHeaderValue class.

Properties

CharSet CharSet CharSet CharSet CharSet

Gets or sets the character set of the entity-body used in the Content-Type HTTP header.

MediaType MediaType MediaType MediaType MediaType

Gets or sets the media-type of the entity-body used in the Content-Type HTTP header.

Parameters Parameters Parameters Parameters Parameters

Gets a set of parameters included in the Content-Type HTTP header.

Methods

Parse(String) Parse(String) Parse(String) Parse(String) Parse(String)

Converts a string to an HttpMediaTypeHeaderValue instance.

ToString() ToString() ToString() ToString() ToString()

Returns a string that represents the current HttpMediaTypeHeaderValue object.

TryParse(String, HttpMediaTypeHeaderValue) TryParse(String, HttpMediaTypeHeaderValue) TryParse(String, HttpMediaTypeHeaderValue) TryParse(String, HttpMediaTypeHeaderValue) TryParse(String, HttpMediaTypeHeaderValue)

Determines whether a string is valid HttpMediaTypeHeaderValue information.

See also