Skip to main content

@std/http@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)
interface Cookie

Represents an HTTP Cookie.

Properties

Name of the cookie.

Value of the cookie.

The cookie's Expires attribute, either as an explicit date or UTC milliseconds.

The cookie's Max-Age attribute, in seconds. Must be a non-negative integer. A cookie with a maxAge of 0 expires immediately.

The cookie's Domain attribute. Specifies those hosts to which the cookie will be sent.

The cookie's Path attribute. A cookie with a path will only be included in the Cookie request header if the requested URL matches that path.

The cookie's Secure attribute. If true, the cookie will only be included in the Cookie request header if the connection uses SSL and HTTPS.

The cookie's HTTPOnly attribute. If true, the cookie cannot be accessed via JavaScript.

optional
sameSite: "Strict" | "Lax" | "None"

Allows servers to assert that a cookie ought not to be sent along with cross-site requests.

Additional key value pairs with the form "key=value"

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/http

Import symbol

import { type Cookie } from "@std/http/cookie";
or

Import directly with a jsr specifier

import { type Cookie } from "jsr:@std/http/cookie";