Home > tough-cookie > Store
Base class for CookieJar stores.
The storage model for each CookieJar instance can be replaced with a custom implementation. The default is MemoryCookieStore.
Signature:
export declare class Store
-
Stores should inherit from the base Store class, which is available as a top-level export.
-
Stores are asynchronous by default, but if Store.synchronous is set to true, then the
*Sync
methods of the containing CookieJar can be used.
Constructor |
Modifiers |
Description |
---|---|---|
Constructs a new instance of the |
Property |
Modifiers |
Type |
Description |
---|---|---|---|
boolean |
Store implementations that support synchronous methods must return |
Method |
Modifiers |
Description |
---|---|---|
Retrieve a Cookie with the given Callback takes an error and the resulting Cookie object. If no cookie is found then null MUST be passed instead (that is, not an error). | ||
Retrieve a Cookie with the given Callback takes an error and the resulting Cookie object. If no cookie is found then null MUST be passed instead (that is, not an error). | ||
Locates all Cookie values matching the given The resulting list is checked for applicability to the current request according to the RFC ( | ||
Locates all Cookie values matching the given The resulting list is checked for applicability to the current request according to the RFC ( | ||
Gets all the cookies in the store. | ||
Gets all the cookies in the store. | ||
Adds a new Cookie to the store. The implementation SHOULD replace any existing cookie with the same | ||
Adds a new Cookie to the store. The implementation SHOULD replace any existing cookie with the same | ||
Removes all cookies from the store. | ||
Removes all cookies from the store. | ||
Remove a cookie from the store (see notes on | ||
Remove a cookie from the store (see notes on | ||
Removes matching cookies from the store. The | ||
Removes matching cookies from the store. The | ||
Update an existing Cookie. The implementation MUST update the | ||
Update an existing Cookie. The implementation MUST update the |