import { CookieMap } from "https://deno.land/std@0.174.0/http/cookie_map.ts";
Provides a way to manage cookies in a request and response on the server as a single iterable collection.
The methods and properties align to Map
. When constructing a
Request
or Headers
from the request need to be
provided, as well as optionally the Response
or Headers
for the
response can be provided. Alternatively the mergeHeaders
function can be used to generate a final set of headers for sending in the
response.
Constructors
Methods
Deletes all the cookies from the Request
in the response.
Set a cookie to be deleted in the response.
This is a convenience function for set(key, null, options?)
.
Iterate over the cookie keys and values that are present in the
Request
. This is an alias of the [Symbol.iterator]
method
present on the class.
Return the value of a matching key present in the Request
. If
the key is not present undefined
is returned.
Returns true
if the matching key is present in the Request
,
otherwise false
.
Set a named cookie in the response. The optional
CookieMapSetDeleteOptions
are applied to the cookie being set.
Iterate over the cookie keys and values that are present in the
Request
.