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