Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);
// ...
cookiejar.getCookies('http://example.com/otherpath', (err, cookies) => {
// res.headers['cookie'] = cookies.join('; ');
});
// All option are optional.
cookiejar.getCookies('http://example.com/otherpath', {}, () => {});
cookiejar.getCookies('http://example.com/otherpath', {
now: new Date(),
allPaths: true,
}, () => {});
CookieJar.deserializeSync("test cookie with store", new MemoryCookieStore());
CookieJar.deserializeSync("test cookie");
setJar (serializedJar): void {
this._cookieJar = serializedJar
? CookieJar.deserializeSync(JSON.parse(serializedJar))
: new CookieJar();
}