HttpCookiePairHeaderValue
HttpCookiePairHeaderValue
HttpCookiePairHeaderValue
HttpCookiePairHeaderValue
Class
Definition
Represents cookie information used in the Cookie HTTP header on an HTTP request.
public : sealed class HttpCookiePairHeaderValue : IStringable, IHttpCookiePairHeaderValuepublic sealed class HttpCookiePairHeaderValue : IStringable, IHttpCookiePairHeaderValuePublic NotInheritable Class HttpCookiePairHeaderValue Implements IStringable, IHttpCookiePairHeaderValue// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
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.
Constructors
HttpCookiePairHeaderValue(String) HttpCookiePairHeaderValue(String) HttpCookiePairHeaderValue(String) HttpCookiePairHeaderValue(String)
Initializes a new instance of the HttpCookiePairHeaderValue class. with a cookie name.
public : HttpCookiePairHeaderValue(PlatForm::String name)public HttpCookiePairHeaderValue(String name)Public Sub New(name As String)// You can use this method in JavaScript.
- name
- PlatForm::String String String String
A token that represents the cookie name.
- See Also
HttpCookiePairHeaderValue(String, String) HttpCookiePairHeaderValue(String, String) HttpCookiePairHeaderValue(String, String) HttpCookiePairHeaderValue(String, String)
Initializes a new instance of the HttpCookiePairHeaderValue class. with a cookie name and a value for the cookie.
public : HttpCookiePairHeaderValue(PlatForm::String name, PlatForm::String value)public HttpCookiePairHeaderValue(String name, String value)Public Sub New(name As String, value As String)// You can use this method in JavaScript.
- name
- PlatForm::String String String String
A token that represents the cookie name.
- value
- PlatForm::String String String String
A value for the cookie.
- See Also
Properties
Name Name Name Name
Gets a token that represents the cookie name used in the Cookie HTTP header.
public : PlatForm::String Name { get; }public string Name { get; }Public ReadOnly Property Name As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A token that represents the cookie name.
Value Value Value Value
Gets or sets a value for the cookie used in the Cookie HTTP header.
public : PlatForm::String Value { get; set; }public string Value { get; set; }Public ReadWrite Property Value As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A value for the cookie.
Methods
Parse(String) Parse(String) Parse(String) Parse(String)
Converts a string to an HttpCookiePairHeaderValue instance.
public : static HttpCookiePairHeaderValue Parse(PlatForm::String input)public static HttpCookiePairHeaderValue Parse(String input)Public Static Function Parse(input As String) As HttpCookiePairHeaderValue// You can use this method in JavaScript.
- input
- PlatForm::String String String String
A string that represents the cookie name and value in the Cookie HTTP header.
An HttpCookiePairHeaderValue instance.
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 cookie information.
ToString() ToString() ToString() ToString()
Returns a string that represents the current HttpCookiePairHeaderValue object.
public : PlatForm::String ToString()public string ToString()Public Function ToString() As string// You can use this method in JavaScript.
A string that represents the current object.
TryParse(String, HttpCookiePairHeaderValue) TryParse(String, HttpCookiePairHeaderValue) TryParse(String, HttpCookiePairHeaderValue) TryParse(String, HttpCookiePairHeaderValue)
Determines whether a string is valid HttpCookiePairHeaderValue information.
public : static PlatForm::Boolean TryParse(PlatForm::String input, HttpCookiePairHeaderValue cookiePairHeaderValue)public static bool TryParse(String input, HttpCookiePairHeaderValue cookiePairHeaderValue)Public Static Function TryParse(input As String, cookiePairHeaderValue As HttpCookiePairHeaderValue) As bool// You can use this method in JavaScript.
- input
- PlatForm::String String String String
The string to validate.
- cookiePairHeaderValue
- HttpCookiePairHeaderValue HttpCookiePairHeaderValue HttpCookiePairHeaderValue HttpCookiePairHeaderValue
The HttpCookiePairHeaderValue version of the string.
true if input is valid HttpCookiePairHeaderValue information; otherwise, false.