Home > tough-cookie > MemoryCookieStore > findCookie
Retrieve a Cookie with the given domain
, path
, and key
(name
). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest or newest such cookie should be returned.
Signature:
findCookie(domain: Nullable<string>, path: Nullable<string>, key: Nullable<string>): Promise<Cookie | undefined>;
Parameter |
Type |
Description |
---|---|---|
domain |
Nullable<string> |
The cookie domain to match against. |
path |
Nullable<string> |
The cookie path to match against. |
key |
Nullable<string> |
The cookie name to match against. |
Promise<Cookie | undefined>