Module

std/http/mod.ts>SecureCookieMap#has

Deno standard library
Go to Latest
method SecureCookieMap.prototype.has
import { SecureCookieMap } from "https://dotland.deno.dev/std@0.181.0/http/mod.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>