Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Headers

Package version

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.

Hierarchy

  • Headers

Index

Methods

append

  • append(name: string, value: string): void
  • Parameters

    • name: string
    • value: string

    Returns void

delete

  • delete(name: string): void
  • Parameters

    • name: string

    Returns void

forEach

  • forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void
  • Parameters

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

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

          Returns void

    • Optional thisArg: any

    Returns void

get

  • get(name: string): string | null
  • Parameters

    • name: string

    Returns string | null

has

  • has(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

set

  • set(name: string, value: string): void
  • Parameters

    • name: string
    • value: string

    Returns void

Generated using TypeDoc