Class 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(). In all methods of this interface, header names are matched by case-insensitive byte sequence.

MDN Reference

Hierarchy

  • Headers

Implements

Constructors

  • Parameters

    Returns Headers

Methods

  • Same as entries().

    Returns IterableIterator<[string, string]>

  • Parameters

    • name: string
    • value: string

    Returns void

  • Parameters

    • name: string

    Returns void

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

    Returns IterableIterator<[string, string]>

  • Parameters

    • callbackfn: ((value, key, parent) => void)
        • (value, key, parent): void
        • Parameters

          • value: string
          • key: string
          • parent: Headers

          Returns void

    • Optional thisArg: any

    Returns void

  • Parameters

    • name: string

    Returns null | string

  • Returns string[]

  • Parameters

    • name: string

    Returns boolean

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

    Returns IterableIterator<string>

  • Parameters

    • name: string
    • value: string

    Returns void

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

    Returns IterableIterator<string>

Generated using TypeDoc