Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Headers

public

A collection of key/value pairs with case-insensitive keys.

Hierarchy

  • Map<string, string>
    • Headers

Index

Properties

Map

Map: MapConstructor

Readonly [Symbol.toStringTag]

[Symbol.toStringTag]: string

Readonly size

size: number

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<[string, string]>
  • Returns an iterable of entries in the map.

    Returns IterableIterator<[string, string]>

clear

  • clear(): void
  • Returns void

delete

  • delete(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

entries

  • entries(): IterableIterator<[string, string]>
  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[string, string]>

forEach

  • forEach(callbackfn: (value: string, key: string, map: Map<string, string>) => void, thisArg?: any): void
  • Parameters

    • callbackfn: (value: string, key: string, map: Map<string, string>) => void
        • (value: string, key: string, map: Map<string, string>): void
        • Parameters

          • value: string
          • key: string
          • map: Map<string, string>

          Returns void

    • Optional thisArg: any

    Returns void

get

  • get(key: string): string | undefined
  • Parameters

    • key: string

    Returns string | undefined

has

  • has(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

keys

  • keys(): IterableIterator<string>
  • Returns an iterable of keys in the map

    Returns IterableIterator<string>

set

  • set(key: string, value: string): this
  • Parameters

    • key: string
    • value: string

    Returns this

values

  • values(): IterableIterator<string>
  • Returns an iterable of values in the map

    Returns IterableIterator<string>

withHeader

  • withHeader(headerName: string, headerValue: string): Headers
  • Returns a new instance of Headers with the specified header set to the provided value. Does not modify the original Headers instance.

    Parameters

    • headerName: string

      The name of the header to add or overwrite

    • headerValue: string

      The value to which the header should be set

    Returns Headers

withoutHeader

  • withoutHeader(headerName: string): Headers
  • Returns a new instance of Headers without the specified header. Does not modify the original Headers instance.

    Parameters

    • headerName: string

      The name of the header to remove

    Returns Headers