import { CookieJar } from "https://dotland.deno.dev/x/another_cookiejar@v5.0.7/mod.ts";
Constructors
new
CookieJar(cookies?: Array<Cookie> | Array<CookieOptions>)Properties
cookies: Cookie[]
Methods
getCookie(options: Cookie | CookieOptions): Cookie | undefined
Gets the first cooking matching the defined properties of a given Cookie or CookieOptions.
returns undefined if not found or expired. creationDate
prop is not checked.
Also removes the cookie and returns undefined if cookie is expired.
getCookies(options?: CookieOptions | Cookie): Cookie[]
Returns cookies that match the options excluding expired ones, also removes expired cookies before returning.
getCookieString(url: string | Request | URL): string
Converts the cookies to a string that can be used in a request.
removeCookie(options: CookieOptions | Cookie): Cookie | undefined
Removes first cookie that matches the given option.
Returns the deleted cookie if found or undefined otherwise.
removeCookies(options?: CookieOptions | Cookie): Array<Cookie> | undefined
Removes all cookies that matches the given option. If options is not given, all cookies will be deleted.
Returns the deleted cookies if found or undefined otherwise.
replaceCookies(cookies?: Array<Cookie> | Array<CookieOptions>)