Methods
clone
- clone(store?: Store): Promise<CookieJar>
-
- clone(store: Store, cb: ((err: Error, newJar: CookieJar) => void)): void
-
Returns void
- clone(cb: ((err: Error, newJar: CookieJar) => void)): void
-
Returns void
cloneSync
- cloneSync(store?: Store): CookieJar
-
getCookieString
- getCookieString(currentUrl: string, options?: CookieJar.GetCookiesOptions): Promise<string>
-
Returns Promise<string>
- getCookieString(currentUrl: string, options: CookieJar.GetCookiesOptions, cb: ((err: Error, cookies: string) => void)): void
-
Parameters
-
currentUrl: string
-
-
cb: ((err: Error, cookies: string) => void)
-
- (err: Error, cookies: string): void
-
Returns void
Returns void
- getCookieString(currentUrl: string, cb: ((err: Error, cookies: string) => void)): void
-
Parameters
-
currentUrl: string
-
cb: ((err: Error, cookies: string) => void)
-
- (err: Error, cookies: string): void
-
Returns void
Returns void
getCookieStringSync
- getCookieStringSync(currentUrl: string, options?: CookieJar.GetCookiesOptions): string
-
Returns string
getCookies
- getCookies(currentUrl: string, options?: CookieJar.GetCookiesOptions): Promise<Cookie[]>
-
Returns Promise<Cookie[]>
- getCookies(currentUrl: string, options: CookieJar.GetCookiesOptions, cb: ((err: Error, cookies: Cookie[]) => void)): void
-
Parameters
-
currentUrl: string
-
-
cb: ((err: Error, cookies: Cookie[]) => void)
Returns void
- getCookies(currentUrl: string, cb: ((err: Error, cookies: Cookie[]) => void)): void
-
Parameters
-
currentUrl: string
-
cb: ((err: Error, cookies: Cookie[]) => void)
Returns void
getSetCookieStrings
- getSetCookieStrings(currentUrl: string, options?: CookieJar.GetCookiesOptions): Promise<string[]>
-
Returns Promise<string[]>
- getSetCookieStrings(currentUrl: string, options: CookieJar.GetCookiesOptions, cb: ((err: Error, cookies: string[]) => void)): void
-
Parameters
-
currentUrl: string
-
-
cb: ((err: Error, cookies: string[]) => void)
-
- (err: Error, cookies: string[]): void
-
Returns void
Returns void
- getSetCookieStrings(currentUrl: string, cb: ((err: Error, cookies: string[]) => void)): void
-
Parameters
-
currentUrl: string
-
cb: ((err: Error, cookies: string[]) => void)
-
- (err: Error, cookies: string[]): void
-
Returns void
Returns void
getSetCookieStringsSync
- getSetCookieStringsSync(currentUrl: string, options?: CookieJar.GetCookiesOptions): string[]
-
Returns string[]
removeAllCookies
- removeAllCookies(): Promise<void>
-
Returns Promise<void>
- removeAllCookies(cb: ((err: Error) => void)): void
-
Parameters
-
cb: ((err: Error) => void)
-
- (err: Error): void
-
Returns void
Returns void
removeAllCookiesSync
- removeAllCookiesSync(): void
-
Returns void
serialize
- serialize(): Promise<CookieJar.Serialized>
-
- serialize(cb: ((err: Error, serializedObject: CookieJar.Serialized) => void)): void
-
Returns void
serializeSync
- serializeSync(): CookieJar.Serialized
-
setCookie
- setCookie(cookieOrString: string | Cookie, currentUrl: string, options?: CookieJar.SetCookieOptions): Promise<Cookie>
-
Parameters
-
cookieOrString: string | Cookie
-
currentUrl: string
-
Returns Promise<Cookie>
- setCookie(cookieOrString: string | Cookie, currentUrl: string, options: CookieJar.SetCookieOptions, cb: ((err: Error, cookie: Cookie) => void)): void
-
Parameters
-
cookieOrString: string | Cookie
-
currentUrl: string
-
-
cb: ((err: Error, cookie: Cookie) => void)
Returns void
- setCookie(cookieOrString: string | Cookie, currentUrl: string, cb: ((err: Error, cookie: Cookie) => void)): void
-
Parameters
-
cookieOrString: string | Cookie
-
currentUrl: string
-
cb: ((err: Error, cookie: Cookie) => void)
Returns void
setCookieSync
- setCookieSync(cookieOrString: string | Cookie, currentUrl: string, options?: CookieJar.SetCookieOptions): Cookie
-
Parameters
-
cookieOrString: string | Cookie
-
currentUrl: string
-
Static
deserialize
- deserialize(serialized: string | CookieJar.Serialized, store?: Store): Promise<CookieJar>
-
- deserialize(serialized: string | CookieJar.Serialized, store: Store, cb: ((err: Error, object: CookieJar) => void)): void
-
Returns void
- deserialize(serialized: string | CookieJar.Serialized, cb: ((err: Error, object: CookieJar) => void)): void
-
Returns void
Static
fromJSON
- fromJSON(string: string): CookieJar
-