Skip to main content
Module

x/oak_sessions/deps.ts>Cookies#get

Session middleware for Oak
Go to Latest
method Cookies.prototype.get
import { Cookies } from "https://deno.land/x/oak_sessions@v4.0.0/deps.ts";

Get the value of a cookie from the request.

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

Parameters

name: string
optional
options: CookiesGetOptions = [UNSUPPORTED]

Returns

Promise<string | undefined>