tough-cookie.cookiejar.md
August 1, 2025 ยท View on GitHub
Home > tough-cookie > CookieJar
CookieJar class
A CookieJar is for storage and retrieval of Cookie objects as defined in RFC6265 - Section 5.3.
It also supports a pluggable persistence layer via Store.
Signature:
declare class CookieJar
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Creates a new |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
string |
The configured PrefixSecurityEnum value for the CookieJar. | |
|
|
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa. | ||
|
Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa. | ||
|
Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa. | ||
|
Produces a deep clone of this CookieJar. Modifications to the original do not affect the clone, and vice versa. Note: Only works if both the configured Store and destination Store are synchronous. | ||
|
|
A new CookieJar is created and the serialized Cookie values are added to the underlying store. Each Cookie is added via | |
|
|
A new CookieJar is created and the serialized Cookie values are added to the underlying store. Each Cookie is added via | |
|
|
A new CookieJar is created and the serialized Cookie values are added to the underlying store. Each Cookie is added via | |
|
|
A new CookieJar is created and the serialized Cookie values are added to the underlying store. Each Cookie is added via Note: Only works if the configured Store is also synchronous. | |
|
|
Alias of CookieJar.deserializeSync(). | |
|
Retrieve the list of cookies that can be sent in a Cookie header for the current URL. | ||
|
Retrieve the list of cookies that can be sent in a Cookie header for the current URL. | ||
|
Retrieve the list of cookies that can be sent in a Cookie header for the current URL. | ||
|
Retrieve the list of cookies that can be sent in a Cookie header for the current URL. | ||
|
Synchronously retrieve the list of cookies that can be sent in a Cookie header for the current URL. Note: Only works if the configured Store is also synchronous. | ||
|
Accepts the same options as | ||
|
Accepts the same options as | ||
|
Accepts the same options as | ||
|
Synchronous version of Note: Only works if the configured Store is also synchronous. | ||
|
Returns an array of strings suitable for | ||
|
Returns an array of strings suitable for | ||
|
Returns an array of strings suitable for | ||
|
Synchronous version of Note: Only works if the configured Store is also synchronous. | ||
|
Removes all cookies from the CookieJar. | ||
|
Removes all cookies from the CookieJar. | ||
|
Removes all cookies from the CookieJar. Note: Only works if the configured Store is also synchronous. | ||
|
Serialize the CookieJar if the underlying store supports | ||
|
Serialize the CookieJar if the underlying store supports | ||
|
Serialize the CookieJar if the underlying store supports Note: Only works if the configured Store is also synchronous. | ||
|
Synchronously attempt to set the Cookie in the CookieJar. Note: Only works if the configured Store is also synchronous. | ||
|
Alias of CookieJar.serializeSync(). Allows the cookie to be serialized with |