import { getCookie } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/http/util.js";
Gets the cookie by the given name
from the Cookie
header of the request
or the Set-Cookie
header of the response.
Examples
Example 1
Example 1
import { getCookie } from "@ayonli/jsext/http";
export default {
fetch(req: Request) {
const cookie = getCookie(req, "foo");
console.log(cookie);
return new Response("Hello, World!");
}
}