import { type Cookie } from "https://deno.land/x/cav@0.0.21/mod.ts";
Cav's cookie interface. This interface provides synchronous access to cookie values. The actual signing of signed cookies needs to be asynchronous, however. Once you are done accessing and modifying the cookie, you need to call the async "flush()" to sync cookie updates to the response headers that were provided when the cookie was initialized.
Methods
Sets a cookie value using the Deno std http module's cookie options. To accomadate signed cookies, the options type is extended to include the "signed" flag.
Unsets a cookie value by key. Path and domain can be specified to limit how the cookie is deleted. When deleting cookies for paths/domains that don't match the request URL, the cookie value will not be removed from the cookie object but the set-cookie header will still be sent on the response.