Class |
Description |
---|---|
An HTTP cookie (web cookie, browser cookie) is a small piece of data that a server sends to a user's web browser. It is defined in RFC6265. | |
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. | |
An in-memory Store implementation for CookieJar. This is the default implementation used by CookieJar and supports both async and sync operations. Also supports serialization, getAllCookies, and removeAllCookies. | |
Represents a validation error. | |
Base class for CookieJar stores. The storage model for each CookieJar instance can be replaced with a custom implementation. The default is MemoryCookieStore. |
Function |
Description |
---|---|
Transforms a domain name into a canonical domain name. The canonical domain name is a domain name that has been trimmed, lowercased, stripped of leading dot, and optionally punycode-encoded (Section 5.1.2 of RFC 6265). For the most part, this function is idempotent (calling the function with the output from a previous call returns the same output). | |
A comparison function that can be used with Array.sort(), which orders a list of cookies into the recommended order given in Step 2 of RFC6265 - Section 5.4. The sort algorithm is, in order of precedence:
| |
Given a current request/response path, gives the path appropriate for storing in a cookie. This is basically the "directory" of a "file" in the path, but is specified by RFC6265 - Section 5.1.4. | |
Answers "does this real domain match the domain in a cookie?". The | |
Format a Date into the preferred Internet standard format defined in RFC822 and updated in RFC1123. | |
Does the reverse of Cookie.toJSON(). | |
Returns the public suffix of this hostname. The public suffix is the shortest domain name upon which a cookie can be set. | |
Parses a string into a Cookie object. | |
Parse a cookie date string into a Date. Parses according to RFC6265 - Section 5.1.1, not Date.parse(). | |
Answers "does the request-path path-match a given cookie-path?" as per RFC6265 Section 5.1.4. This is essentially a prefix-match where cookiePath is a prefix of reqPath. | |
Generates the permutation of all possible values that domainMatch() the given | |
Generates the permutation of all possible values that pathMatch() the |
Interface |
Description |
---|---|
A callback function that accepts an error or a result. | |
Configuration settings to be used with a CookieJar. | |
Configurable values that can be set when creating a Cookie. | |
A callback function that only accepts an error. | |
Configuration options used when calling | |
Options for configuring how getPublicSuffix() behaves. | |
Optional configuration to be used when parsing cookies. | |
A JSON representation of a CookieJar. | |
Configuration options used when calling |
Variable |
Description |
---|---|
Cookie prefixes are a way to indicate that a given cookie was set with a set of attributes simply by inspecting the first few characters of the cookie's name. These are defined in RFC6265bis - Section 4.1.3. The following values can be used to configure how a CookieJar enforces attribute restrictions for Cookie prefixes:
| |
The version of |
Type Alias |
Description |
---|---|
The inverse of NonNullable. | |
A JSON object that is created when Cookie.toJSON() is called. This object will contain the properties defined in Cookie.serializableProperties. |