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)
property Cookie.expires

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

Examples

Explicit date:

import { Cookie } from "@std/http/cookie";
const cookie: Cookie = {
  name: 'name',
  value: 'value',
  // expires on Fri Dec 30 2022
  expires: new Date('2022-12-31')
}

UTC milliseconds

import { Cookie } from "@std/http/cookie";
const cookie: Cookie = {
  name: 'name',
  value: 'value',
  // expires 10 seconds from now
  expires: Date.now() + 10000
}

Type

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";
or

Import directly with a jsr specifier

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