Skip to content

Documentation / @imvu/rest / restoreCookieJar

Function: restoreCookieJar() ​

ts
function restoreCookieJar(serialized): Promise<CookieJar>;

Defined in: packages/rest/src/cookies.ts:39

Rebuild a cookie jar from saved JSON: tough-cookie's own serialization, or the legacy tough-cookie-file-store layout ({ domain: { path: { key: cookie } } }) so existing cookies.json sessions survive the switch. Unreadable data yields an empty jar — the same as having no saved session.

Parameters ​

ParameterType
serializedstring | null

Returns ​

Promise<CookieJar>

Released under the MIT License.