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

std/http/mod.ts>SecureCookieMap#has

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method SecureCookieMap.prototype.has
import { SecureCookieMap } from "https://deno.land/std@0.168.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>