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

x/reno/reno/mod.ts>withCookies

A thin, testable routing library designed to sit on top of Deno's standard HTTP module
Go to Latest
function withCookies
import { withCookies } from "https://deno.land/x/reno@v2.0.75/reno/mod.ts";

Assigns the provided cookies to the underlying Response instance, which are then sent to the requestor via multiple Set-Cookie headers:

const handler: RouteHandler = async req => withCookies(
  new Response("Hi!"),
  [
    ["session_id", await getSessionId(req)],
  ],
);

Parameters

cookies: [string, string][]

Returns

AugmentedResponse