Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/http/mod.ts>SecureCookieMap#set

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method SecureCookieMap.prototype.set
import { SecureCookieMap } from "https://deno.land/std@0.187.0/http/mod.ts";

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.

Parameters

key: string
value: string | null
optional
options: SecureCookieMapSetDeleteOptions = [UNSUPPORTED]

Returns

Promise<this>