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

std/http/mod.ts>SecureCookieMap#get

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

Get the value of a cookie from the Request.

If the cookie is signed, and the signature is invalid, undefined will be returned and the cookie will be set to be deleted in the response. If the cookie is using an "old" key from the keyring, the cookie will be re-signed with the current key and be added to the response to be updated.

Parameters

key: string
optional
options: SecureCookieMapGetOptions = [UNSUPPORTED]

Returns

Promise<string | undefined>