Skip to content

Latest commit

 

History

History
85 lines (40 loc) · 1.4 KB

tough-cookie.memorycookiestore.findcookie.md

File metadata and controls

85 lines (40 loc) · 1.4 KB

Home > tough-cookie > MemoryCookieStore > findCookie

MemoryCookieStore.findCookie() method

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>;

Parameters

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.

**Returns:**

Promise<Cookie | undefined>