Skip to main content
Module

x/oak/mod.ts>Cookies#set

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
method Cookies.prototype.set
import { Cookies } from "https://deno.land/x/oak@v12.5.0/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>