import { type Headers } from "https://deno.land/x/deno@v1.39.0/ext/fetch/lib.deno_fetch.d.ts";
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.
Methods
Appends a new value onto an existing header inside a Headers
object, or
adds the header if it does not already exist.
Returns a ByteString
sequence of all the values of a header within a
Headers
object with a given name.
Returns a boolean stating whether a Headers
object contains a certain
header.
Sets a new value for an existing header inside a Headers object, or adds the header if it does not already exist.
import { Headers } from "https://deno.land/x/deno@v1.39.0/ext/fetch/lib.deno_fetch.d.ts";
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.