main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
635 bytes
|
Line | |
---|
1 | /// <reference types="node" />
|
---|
2 |
|
---|
3 | import type { Headers } from './fetch'
|
---|
4 |
|
---|
5 | export interface Cookie {
|
---|
6 | name: string
|
---|
7 | value: string
|
---|
8 | expires?: Date | number
|
---|
9 | maxAge?: number
|
---|
10 | domain?: string
|
---|
11 | path?: string
|
---|
12 | secure?: boolean
|
---|
13 | httpOnly?: boolean
|
---|
14 | sameSite?: 'Strict' | 'Lax' | 'None'
|
---|
15 | unparsed?: string[]
|
---|
16 | }
|
---|
17 |
|
---|
18 | export function deleteCookie (
|
---|
19 | headers: Headers,
|
---|
20 | name: string,
|
---|
21 | attributes?: { name?: string, domain?: string }
|
---|
22 | ): void
|
---|
23 |
|
---|
24 | export function getCookies (headers: Headers): Record<string, string>
|
---|
25 |
|
---|
26 | export function getSetCookies (headers: Headers): Cookie[]
|
---|
27 |
|
---|
28 | export function setCookie (headers: Headers, cookie: Cookie): void
|
---|
Note:
See
TracBrowser
for help on using the repository browser.