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