import { stringifyCookie } from "https://deno.land/x/ayonli_jsext@v0.9.72/workerd/http.ts";
Converts a Cookie object to a string.
Examples
Example 1
Example 1
import { stringifyCookie } from "@ayonli/jsext/http";
const cookie = stringifyCookie({
name: "foo",
value: "bar",
domain: "example.com",
path: "/",
expires: new Date("2021-06-09T10:18:14Z"),
httpOnly: true,
secure: true,
sameSite: "Strict"
});
console.log(cookie);
// foo=bar; Domain=example.com; Path=/; Expires=Wed, 09 Jun 2021 10:18:14 GMT; HttpOnly; Secure; SameSite=Strict
Parameters
cookie: Cookie