import { parseCookie } from "https://deno.land/x/ayonli_jsext@v0.9.72/http/util.ts";
Parses the Set-Cookie
header.
Examples
Example 1
Example 1
import { parseCookie } from "@ayonli/jsext/http";
const cookie = parseCookie("foo=bar; Domain=example.com; Path=/; Expires=Wed, 09 Jun 2021 10:18:14 GMT; HttpOnly; Secure; SameSite=Strict");
console.log(cookie);
// {
// name: "foo",
// value: "bar",
// domain: "example.com",
// path: "/",
// expires: 1623233894000,
// httpOnly: true,
// secure: true,
// sameSite: "strict"
// }