Cookies
import { Cookies } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/deps.ts";
An interface which allows setting and accessing cookies related to both the current request and response.
§Methods
Set a cookie to be deleted in the response. This is a "shortcut" to
.set(name, null, options?)
.
Iterate over the request's cookies, yielding up a tuple containing the key and the value.
If there are keys set on the application, only keys and values that are properly signed will be returned.
Get the value of a cookie from the request.
If the cookie is signed, and the signature is invalid, the cookie will be set to be deleted in the the response. If the signature uses an "old" key, 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 keys.
If there are keys set on the application, only the keys that are properly signed will be returned.
Set a cookie in the response.
If there are keys set in the application, cookies will be automatically
signed, unless overridden by the set options. Cookies can be deleted by
setting the value to null
.