Skip to main content
HttpExpectationHeaderValue class

Represents a token for a particular server behavior required by the client that is used in the Expect HTTP header on an HTTP request.

Syntax


var httpExpectationHeaderValue = new Windows.Web.Http.Headers.HttpExpectationHeaderValue(string);
var httpExpectationHeaderValue = new Windows.Web.Http.Headers.HttpExpectationHeaderValue(string, string);

public sealed class HttpExpectationHeaderValue : IStringable

Public NotInheritable Class HttpExpectationHeaderValue
    Implements IStringable

public ref class HttpExpectationHeaderValue sealed : IStringable

Members

The HttpExpectationHeaderValue class has these types of members:

Constructors

The HttpExpectationHeaderValue class has these constructors.

ConstructorDescription
HttpExpectationHeaderValue(String) Initializes a new instance of the HttpExpectationHeaderValue class with a name.
HttpExpectationHeaderValue(String, String) Initializes a new instance of the HttpExpectationHeaderValue class with a name and value for the name.

 

Methods

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

 

Properties

The HttpExpectationHeaderValue class has these properties.

PropertyAccess typeDescription

Name

Read-only

Gets or sets a token that represents a name for a server behavior used in the Expect HTTP header.

Parameters

Read-only

Gets a set of parameters for a server behavior included in the Expect HTTP header.

Value

Read/write

Gets or sets a value for a server behavior used in the Expect HTTP header.

 

Remarks

The HttpExpectationHeaderValue class is a token that represents a particular server behavior that is required by the client. The HttpExpectationHeaderValue is used in the Expect HTTP header on an HTTP request.

For example, 100-continue is a server behavior that the client might depend on and set using the HttpExpectationHeaderValue class.

The Expect property on the HttpRequestHeaderCollection returns an HttpExpectationHeaderValueCollection that contains HttpExpectationHeaderValue objects.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

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

Attributes

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

See also

Expect
HttpExpectationHeaderValueCollection
HttpRequestHeaderCollection
IStringable
Object