HttpContentCodingHeaderValue HttpContentCodingHeaderValue HttpContentCodingHeaderValue HttpContentCodingHeaderValue Class

Definition

Represents content encoding information used in the Content-Encoding HTTP header on HTTP content in a request or a response.

public : sealed class HttpContentCodingHeaderValue : IStringable, IHttpContentCodingHeaderValue
public sealed class HttpContentCodingHeaderValue : IStringable, IHttpContentCodingHeaderValue
Public NotInheritable Class HttpContentCodingHeaderValue Implements IStringable, IHttpContentCodingHeaderValue
var httpContentCodingHeaderValue = new httpContentCodingHeaderValue(contentCoding);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The HttpContentCodingHeaderValue class represents content encoding information used in the Content-Encoding HTTP header on HTTP content sent in an HTTP request or received in an HTTP response.

The ContentEncoding property on the HttpContentHeaderCollection returns an HttpContentCodingHeaderValueCollection that contains HttpContentCodingHeaderValue objects.

Constructors

HttpContentCodingHeaderValue(String) HttpContentCodingHeaderValue(String) HttpContentCodingHeaderValue(String) HttpContentCodingHeaderValue(String)

Initializes a new instance of the HttpContentCodingHeaderValue class.

public : HttpContentCodingHeaderValue(Platform::String contentCoding)
public HttpContentCodingHeaderValue(String contentCoding)
Public Sub New(contentCoding As String)
var httpContentCodingHeaderValue = new httpContentCodingHeaderValue(contentCoding);
Parameters
contentCoding
Platform::String String String String

The value of the content-coding to use.

Properties

ContentCoding ContentCoding ContentCoding ContentCoding

Gets the value of the content-coding information used in the Content-Encoding HTTP header.

public : Platform::String ContentCoding { get; }
public string ContentCoding { get; }
Public ReadOnly Property ContentCoding As string
var string = httpContentCodingHeaderValue.contentCoding;
Value
Platform::String string string string

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

Methods

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

Converts a string to an HttpContentCodingHeaderValue instance.

public : static HttpContentCodingHeaderValue Parse(Platform::String input)
public static HttpContentCodingHeaderValue Parse(String input)
Public Static Function Parse(input As String) As HttpContentCodingHeaderValue
var httpContentCodingHeaderValue = Windows.Web.Http.Headers.HttpContentCodingHeaderValue.parse(input);
Parameters
input
Platform::String String String String

A string that represents the content coding information in the Content-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 = httpContentCodingHeaderValue.toString();
Returns
Platform::String string string string

A string that represents the current object.

TryParse(String, HttpContentCodingHeaderValue) TryParse(String, HttpContentCodingHeaderValue) TryParse(String, HttpContentCodingHeaderValue) TryParse(String, HttpContentCodingHeaderValue)

Determines whether a string is valid HttpContentCodingHeaderValue information.

public : static Platform::Boolean TryParse(Platform::String input, HttpContentCodingHeaderValue contentCodingHeaderValue)
public static bool TryParse(String input, HttpContentCodingHeaderValue contentCodingHeaderValue)
Public Static Function TryParse(input As String, contentCodingHeaderValue As HttpContentCodingHeaderValue) As bool
var bool = Windows.Web.Http.Headers.HttpContentCodingHeaderValue.tryParse(input, contentCodingHeaderValue);
Parameters
input
Platform::String String String String

The string to validate.

Returns
Platform::Boolean bool bool bool

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