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

x/drash/tests/deps.ts>Drash.Request#getCookie

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
method Drash.Request.prototype.getCookie
import { Drash } from "https://deno.land/x/drash@v2.7.0/tests/deps.ts";
const { Request } = Drash;

Get a cookie value by the name that is sent in with the request.

Parameters

name: string
  • The name of the cookie to retrieve

Returns

string

The cookie value associated with the cookie name or undefined if a cookie with that name doesn't exist