Sdílet prostřednictvím


IHttpCookie Interface

Definition

A representation of an HTTP cookie

public interface IHttpCookie
type IHttpCookie = interface
Public Interface IHttpCookie
Derived

Properties

Domain

Gets or sets the allowed hosts to receive the cookie.

Expires

Gets or sets experation date of the cookie. An experation date sets the cookie to expire at a specific date instead of when the client closes. NOTE: It is generally recommended that you use MaxAge over Expires.

HttpOnly

Gets or sets the HttpOnly attributes on the cookie. A value of true will make the cookie inaccessible to JavaScript's Document.cookie API.

MaxAge

Gets or sets the number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately.

Name

Gets or sets the cookie name.

Path

Gets or sets the URL path that must exist in the requested URL.

SameSite

Gets or sets an option to restrict the cookie to not be sent with cross-site requests.

Secure

Gets or sets the Secure attribute on the cookie. A value of true will ensure that the cookie is only sent with encrypted requests over HTTPS.

Value

Gets or sets the cookie value.

Applies to