import { Cookies } from "https://deno.land/x/acorn@0.0.11/deps.ts";
Constructors
A class which provides an abstraction for getting and setting cookies in request and response headers.
This was heavily influenced by pillarjs/cookies.
Methods
Set a cookie to be deleted in the response. This is a convenience function
for .set(name, null, options?)
.
Iterate over the request's cookies, yielding up a tuple containing the key and value of each cookie.
If a key ring was provided, only properly signed cookie keys and values are returned.
Get the value of a cookie from the request.
If the cookie is signed, and the signature is invalid, undefined
will be
returned and the cookie will be set to be deleted in the response. If the
cookie is using an "old" key from the keyring, the cookie will be re-signed
with the current key and be added to the response to be updated.
Iterate over the request's cookies, yielding up the key of each cookie.
If a keyring was provided, only properly signed cookie keys are returned.
Set a cookie in the response headers.
If there was a keyring set, cookies will be automatically signed, unless
overridden by the passed options. Cookies can be deleted by setting the
value to null
.
Iterate over the request's cookies, yielding up the value of each cookie.
If a keyring was provided, only properly signed cookie values are returned.