Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Headers

This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.

interface Headers {
[[Symbol.iterator]](): IterableIterator<[string, string]>;
append(name: string, value: string): void;
delete(name: string): void;
entries(): IterableIterator<[string, string]>;
forEach(callbackfn: (
value: string,
key: string,
parent: Headers,
) => void
, thisArg?: any): void;
get(name: string): string | null;
has(name: string): boolean;
keys(): IterableIterator<string>;
set(name: string, value: string): void;
values(): IterableIterator<string>;
}
var Headers: {
prototype: Headers;
new (init?: HeadersInit): Headers;
}
;

§Methods

§
[[Symbol.iterator]](): IterableIterator<[string, string]>
[src]
§
append(name: string, value: string): void
[src]
§
delete(name: string): void
[src]
§
entries(): IterableIterator<[string, string]>
[src]

Returns an iterator allowing to go through all key/value pairs contained in this object.

§
forEach(callbackfn: (
value: string,
key: string,
parent: Headers,
) => void
, thisArg?: any): void
[src]
§
get(name: string): string | null
[src]
§
has(name: string): boolean
[src]
§
keys(): IterableIterator<string>
[src]

Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.

§
set(name: string, value: string): void
[src]
§
values(): IterableIterator<string>
[src]

Returns an iterator allowing to go through all values of the key/value pairs contained in this object.