Home > tough-cookie > CreateCookieOptions
Configurable values that can be set when creating a Cookie.
Signature:
export interface CreateCookieOptions
Property |
Modifiers |
Type |
Description |
---|---|---|---|
Date | 'Infinity' | null |
(Optional) Set to the date and time when a Cookie is initially stored or a matching cookie is received that replaces an existing cookie (See RFC6265 Section 5.3). Also used to maintain ordering among cookies. Among cookies that have equal-length path fields, cookies with earlier creation-times are listed before cookies with later creation-times (See RFC6265 Section 5.4). | ||
string | null |
(Optional) The 'Domain' attribute of the cookie represents the domain the cookie belongs to (See RFC6265 Section 5.2.3). | ||
Date | 'Infinity' | null |
(Optional) The 'Expires' attribute of the cookie (See RFC6265 Section 5.2.1). | ||
string[] | null |
(Optional) Contains attributes which are not part of the defined spec but match the | ||
boolean | null |
(Optional) A boolean flag indicating if a cookie is a host-only cookie (i.e.; when the request's host exactly matches the domain of the cookie) or not (See RFC6265 Section 5.3). | ||
boolean |
(Optional) The 'HttpOnly' flag of the cookie indicates if the cookie is inaccessible to client scripts or not (See RFC6265 Section 5.2.6). | ||
string |
(Optional) The name or key of the cookie | ||
Date | 'Infinity' | null |
(Optional) Set to the date and time when a cookie was initially stored (RFC6265 Section 5.3) and updated whenever the cookie is retrieved from the CookieJar (RFC6265 Section 5.4). | ||
number | 'Infinity' | '-Infinity' | null |
(Optional) The 'Max-Age' attribute of the cookie (See RFC6265 Section 5.2.2). | ||
string | null |
(Optional) The 'Path' attribute of the cookie represents the path of the cookie (See RFC6265 Section 5.2.4). | ||
boolean | null |
(Optional) A boolean flag indicating if a cookie had no 'Path' attribute and the default path was used (See RFC6265 Section 5.2.4). | ||
string | undefined |
(Optional) The 'SameSite' attribute of a cookie as defined in RFC6265bis (See RFC6265bis (v13) Section 5.2). | ||
boolean |
(Optional) The 'Secure' flag of the cookie indicates if the scope of the cookie is limited to secure channels (e.g.; HTTPS) or not (See RFC6265 Section 5.2.5). | ||
string |
(Optional) The value of the cookie |