import { type CookieJar } from "https://deno.land/x/cav@0.0.24/mod.ts";
Interface for reading and updating the cookies for a Request. Supports cookie
signing. Most operations are synchronous, with the exception of
.setCookies()
.
Properties
Updates a cookie's value. Cookies with the signed
option set to true will
be stored as a JWT with the header removed, signed using the keys provided
when the CookieJar was created.
When both the maxAge
and expires
options are specified, only maxAge
will be used; expires
will be ignored.
delete: (name: string, opt?: CookieDeleteOptions) => void
Removes a cookie by clearing and expiring any previous value.
setCookies: (headers: Headers) => Promise<void>
Calculates the set-cookie headers for all updates applied to this CookieJar and appends them to the given Headers instance. Note that this operation is asynchronous while the other CookieJar operations are synchronous.