Skip to main content
Module

std/http/mod.ts>SecureCookieMap#get

Deno standard library
Go to Latest
method SecureCookieMap.prototype.get
import { SecureCookieMap } from "https://deno.land/std@0.166.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>