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, IHttpContentCodingWithQualityHeaderValue
public sealed class HttpContentCodingWithQualityHeaderValue : IStringable, IHttpContentCodingWithQualityHeaderValue
Public NotInheritable Class HttpContentCodingWithQualityHeaderValue Implements IStringable, IHttpContentCodingWithQualityHeaderValue
var httpContentCodingWithQualityHeaderValue = new httpContentCodingWithQualityHeaderValue(contentCoding);
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)
var httpContentCodingWithQualityHeaderValue = new httpContentCodingWithQualityHeaderValue(contentCoding);
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)
var httpContentCodingWithQualityHeaderValue = new httpContentCodingWithQualityHeaderValue(contentCoding, quality);
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
var string = httpContentCodingWithQualityHeaderValue.contentCoding;
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>
var nullable = httpContentCodingWithQualityHeaderValue.quality;
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
var httpContentCodingWithQualityHeaderValue = Windows.Web.Http.Headers.HttpContentCodingWithQualityHeaderValue.parse(input);
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
var string = httpContentCodingWithQualityHeaderValue.toString();
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
var bool = Windows.Web.Http.Headers.HttpContentCodingWithQualityHeaderValue.tryParse(input, contentCodingWithQualityHeaderValue);
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.