HTTP Headers.

Hierarchy

  • HttpHeaders

Methods

  • Get all values of a header with the given name (case-insensitive).

    Parameters

    • name: string

    Returns any[]

  • Get the first value of a header with the given name (case-insensitive), or null if not available.

    Parameters

    • name: string

    Returns null | string

  • Get the first value of a header with the given name (case-insensitive) as a number, or null if not available.

    Parameters

    • name: string

    Returns null | number

  • Convert the HTTP Headers into a Multi-map.

    Returns {
        [key: string]: string[];
    }

    • [key: string]: string[]
  • Get the single value of a header with the given name (case-insensitive), or null if not available. If more than one value is available, an error is thrown.

    Parameters

    • name: string

    Returns null | string