Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/oak_nest/deps.ts>OakCookie#has

Refer to nestjs to realize some common functions for Deno
Go to Latest
method OakCookie.prototype.has
import { OakCookie } from "https://deno.land/x/oak_nest@v2.0.0/deps.ts";

Returns true if the key is in the Request.

If the cookie is signed, and the signature is invalid, false 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<boolean>