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.

HttpMediaTypeWithQualityHeaderValue class

Applies to Windows and Windows Phone

Represents accept information used in the Accept HTTP header on an HTTP request.

Syntax


var httpMediaTypeWithQualityHeaderValue = new Windows.Web.Http.Headers.HttpMediaTypeWithQualityHeaderValue(string);
var httpMediaTypeWithQualityHeaderValue = new Windows.Web.Http.Headers.HttpMediaTypeWithQualityHeaderValue(string, double);

Attributes

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

Members

The HttpMediaTypeWithQualityHeaderValue class has these types of members:

Constructors

The HttpMediaTypeWithQualityHeaderValue class has these constructors.

ConstructorDescription
HttpMediaTypeWithQualityHeaderValue(String) Initializes a new instance of the HttpMediaTypeHeaderValue class with a media type.
HttpMediaTypeWithQualityHeaderValue(String, Double) Initializes a new instance of the HttpMediaTypeHeaderValue class with a media type and quality.

 

Methods

The HttpMediaTypeWithQualityHeaderValue 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 HttpMediaTypeWithQualityHeaderValue instance.
ToString Returns a string that represents the current HttpMediaTypeWithQualityHeaderValue object.
TryParse Determines whether a string is valid HttpMediaTypeWithQualityHeaderValue information.

 

Properties

The HttpMediaTypeWithQualityHeaderValue class has these properties.

PropertyAccess typeDescription

CharSet

Read/writeGets or sets the character set of the content to accept that is used in the Accept HTTP header.

MediaType

Read/writeGets or sets the media-type of the content to accept that is used in the Accept HTTP header.

Parameters

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

Quality

Read/writeGet or set the qvalue or quality used in the Accept HTTP header.

 

Remarks

The HttpMediaTypeWithQualityHeaderValue class represents accept information used in the Accept HTTP header on an HTTP request.

The Accept property on the HttpRequestHeaderCollection returns an HttpMediaTypeWithQualityHeaderValueCollection that contains HttpMediaTypeWithQualityHeaderValue objects.

The Quality property represents the quality factor that allows the user agent to indicate the relative degree of preference for the media type in a header. Quality uses a scale from 0 to 1. The default value is q=1.

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

Accept
HttpMediaTypeWithQualityHeaderValueCollection
HttpRequestHeaderCollection
Object
IStringable

 

 

Show:
© 2014 Microsoft. All rights reserved.