Skip to main content
HttpCookiePairHeaderValue class

Applies to Windows and Windows Phone

Represents cookie information used in the Cookie HTTP header on an HTTP request.

Syntax


var httpCookiePairHeaderValue = new Windows.Web.Http.Headers.HttpCookiePairHeaderValue(string);
var httpCookiePairHeaderValue = new Windows.Web.Http.Headers.HttpCookiePairHeaderValue(string, string);

public sealed class HttpCookiePairHeaderValue : IStringable

Public NotInheritable Class HttpCookiePairHeaderValue
    Implements IStringable

public ref class HttpCookiePairHeaderValue sealed : IStringable

Attributes

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

Members

The HttpCookiePairHeaderValue class has these types of members:

Constructors

The HttpCookiePairHeaderValue class has these constructors.

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

 

Methods

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

 

Properties

The HttpCookiePairHeaderValue class has these properties.

PropertyAccess typeDescription

Name

Read-onlyGets a token that represents the cookie name used in the Cookie HTTP header.

Value

Read/writeGets or sets a value for the cookie used in the Cookie HTTP header.

 

Remarks

The HttpCookiePairHeaderValue class represents cookie information used in the Cookie HTTP header on an HTTP request.

The Cookie property on the HttpRequestHeaderCollection returns an HttpCookiePairHeaderValueCollection that contains HttpCookiePairHeaderValue objects.

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

Cookie
HttpCookiePairHeaderValueCollection
HttpRequestHeaderCollection
IStringable
Object