HttpContentCodingWithQualityHeaderValue HttpContentCodingWithQualityHeaderValue HttpContentCodingWithQualityHeaderValue HttpContentCodingWithQualityHeaderValue Class

Definition

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

public : sealed class HttpContentCodingWithQualityHeaderValue : IStringable, IHttpContentCodingWithQualityHeaderValuepublic sealed class HttpContentCodingWithQualityHeaderValue : IStringable, IHttpContentCodingWithQualityHeaderValuePublic NotInheritable Class HttpContentCodingWithQualityHeaderValue Implements IStringable, IHttpContentCodingWithQualityHeaderValue// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The HttpContentCodingWithQualityHeaderValue class represents accept encoding information used in the Accept-Encoding HTTP header on an HTTP request.

The AcceptEncoding property on the HttpRequestHeaderCollection returns an HttpContentCodingWithQualityHeaderValueCollection that contains HttpContentCodingWithQualityHeaderValue objects.

Constructors

HttpContentCodingWithQualityHeaderValue(String) HttpContentCodingWithQualityHeaderValue(String) HttpContentCodingWithQualityHeaderValue(String) HttpContentCodingWithQualityHeaderValue(String)

Initializes a new instance of the HttpContentCodingHeaderValue class with content-coding information.

public : HttpContentCodingWithQualityHeaderValue(PlatForm::String contentCoding)public HttpContentCodingWithQualityHeaderValue(String contentCoding)Public Sub New(contentCoding As String)// You can use this method in JavaScript.
Parameters
contentCoding
PlatForm::String String String String

The value of the content-coding to use.

See Also

HttpContentCodingWithQualityHeaderValue(String, Double) HttpContentCodingWithQualityHeaderValue(String, Double) HttpContentCodingWithQualityHeaderValue(String, Double) HttpContentCodingWithQualityHeaderValue(String, Double)

Initializes a new instance of the HttpContentCodingHeaderValue class with content-coding information and a qvalue.

public : HttpContentCodingWithQualityHeaderValue(PlatForm::String contentCoding, double quality)public HttpContentCodingWithQualityHeaderValue(String contentCoding, Double quality)Public Sub New(contentCoding As String, quality As Double)// You can use this method in JavaScript.
Parameters
contentCoding
PlatForm::String String String String

The value of the content-coding information to use.

quality
double Double Double Double

The value of the qvalue to use.

See Also

Properties

ContentCoding ContentCoding ContentCoding ContentCoding

Gets the value of the content-coding characteristic in the Accept-Encoding HTTP header.

public : PlatForm::String ContentCoding { get; }public string ContentCoding { get; }Public ReadOnly Property ContentCoding As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The value of the content-coding characteristic in the Accept-Encoding HTTP header.

Quality Quality Quality Quality

Gets the value of the qvalue attribute in the Accept-Encoding HTTP header.

public : IReference<double> Quality { get; }public Nullable<double> Quality { get; }Public ReadOnly Property Quality As Nullable<double>// You can use this property in JavaScript.
Value
IReference<double> Nullable<double> Nullable<double> Nullable<double>

The value of the qvalue attribute in the Accept-Encoding HTTP header.

Methods

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

Converts a string to an HttpContentCodingWithQualityHeaderValue instance.

public : static HttpContentCodingWithQualityHeaderValue Parse(PlatForm::String input)public static HttpContentCodingWithQualityHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpContentCodingWithQualityHeaderValue// You can use this method in JavaScript.
Parameters
input
PlatForm::String String String String

A string that represents the content coding information in the Accept-Encoding HTTP header.

Returns

Remarks

Below are the exceptions that this function throws.

E_INVALIDARG

The input parameter is null (Nothing in Visual Basic).

The input parameter is not valid content coding information.

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

Returns a string that represents the current HttpContentCodingHeaderValue object.

public : PlatForm::String ToString()public string ToString()Public Function ToString() As string// You can use this method in JavaScript.
Returns
PlatForm::String string string string

A string that represents the current object.

TryParse(String, HttpContentCodingWithQualityHeaderValue) TryParse(String, HttpContentCodingWithQualityHeaderValue) TryParse(String, HttpContentCodingWithQualityHeaderValue) TryParse(String, HttpContentCodingWithQualityHeaderValue)

Determines whether a string is valid HttpContentCodingWithQualityHeaderValue information.

public : static PlatForm::Boolean TryParse(PlatForm::String input, HttpContentCodingWithQualityHeaderValue contentCodingWithQualityHeaderValue)public static bool TryParse(String input, HttpContentCodingWithQualityHeaderValue contentCodingWithQualityHeaderValue)Public Static Function TryParse(input As String, contentCodingWithQualityHeaderValue As HttpContentCodingWithQualityHeaderValue) As bool// You can use this method in JavaScript.
Parameters
input
PlatForm::String String String String

The string to validate.

Returns
PlatForm::Boolean bool bool bool

true if input is valid HttpContentCodingWithQualityHeaderValue information; otherwise, false.