Home > tough-cookie > parse
Parses a string into a Cookie object.
Signature:
declare function parse(str: string, options?: ParseCookieOptions): Cookie | undefined;|
Parameter |
Type |
Description |
|---|---|---|
|
str |
string |
The |
|
options |
(Optional) Configures |
Returns:
Cookie | undefined
Note: when parsing a Cookie header it must be split by ';' before each Cookie string can be parsed.