Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpMediaTypeHeaderValue class

Applies to Windows and Windows Phone

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

Syntax


var httpMediaTypeHeaderValue = new Windows.Web.Http.Headers.HttpMediaTypeHeaderValue();

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The HttpMediaTypeHeaderValue class has these types of members:

Constructors

The HttpMediaTypeHeaderValue class has these constructors.

ConstructorDescription
HttpMediaTypeHeaderValue Initializes a new instance of the HttpMediaTypeHeaderValue class.

 

Methods

The HttpMediaTypeHeaderValue class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Parse Converts a string to an HttpMediaTypeHeaderValue instance.
ToString Returns a string that represents the current HttpMediaTypeHeaderValue object.
TryParse Determines whether a string is valid HttpMediaTypeHeaderValue information.

 

Properties

The HttpMediaTypeHeaderValue class has these properties.

PropertyAccess typeDescription

CharSet

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

MediaType

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

Parameters

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

 

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.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.winmd

See also

ContentType
HttpContentHeaderCollection
IStringable
Object

 

 

Show:
© 2014 Microsoft