Partager via


CookieHeaderValue Class

Provides value for the cookie header.

Inheritance Hierarchy

System.Object
  System.Net.Http.Headers.CookieHeaderValue

Namespace:  System.Net.Http.Headers
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

Syntax

'Declaration
Public Class CookieHeaderValue _
    Implements ICloneable
'Usage
Dim instance As CookieHeaderValue
public class CookieHeaderValue : ICloneable
public ref class CookieHeaderValue : ICloneable
type CookieHeaderValue =  
    class 
        interface ICloneable 
    end
public class CookieHeaderValue implements ICloneable

The CookieHeaderValue type exposes the following members.

Constructors

  Name Description
Protected method CookieHeaderValue() Initializes a new instance of the CookieHeaderValue class.
Public method CookieHeaderValue(String, NameValueCollection) Initializes a new instance of the CookieHeaderValue class.
Public method CookieHeaderValue(String, String) Initializes a new instance of the CookieHeaderValue class.

Top

Properties

  Name Description
Public property Cookies Gets a collection of cookies sent by the client.
Public property Domain Gets or sets the domain to associate the cookie with.
Public property Expires Gets or sets the expiration date and time for the cookie.
Public property HttpOnly Gets or sets a value that specifies whether a cookie is accessible by client-side script.
Public property Item Gets a shortcut to the cookie property.
Public property MaxAge Gets or sets the maximum age permitted for a resource.
Public property Path Gets or sets the virtual path to transmit with the current cookie.
Public property Secure Gets or sets a value indicating whether to transmit the cookie using Secure Sockets Layer (SSL)—that is, over HTTPS only.

Top

Methods

  Name Description
Public method Clone Creates a shallow copy of the cookie value.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Overrides Object.ToString().)
Public methodStatic member TryParse Indicates a value whether the string representation will be converted.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Net.Http.Headers Namespace