Common interface for a set of HTTP headers.

Hierarchy

  • HttpHeaders

Implements

Constructors

Properties

length: number

Methods

  • Iterator. Allows for: let headers = new HttpHeaders(); ... for (const header of headers) { }

    Returns Iterator<HttpHeader, any, undefined>

  • Add a name/value pair

    Parameters

    • key: string

      The header name

    • value: string

      The header value

    Returns void

  • Clears the entire header set

    Returns void

  • Gets the first value for the given name, ignoring any additional values

    Parameters

    • key: string

      The header name to look for

    Returns string

    The first header value, or default if no values exist

  • Get the list of values for the given name

    Parameters

    • key: string

      The header name to look for

    Returns string[]

    List of values, or empty list if none exist

  • Removes all values for the given name

    Parameters

    • key: string

      The header to remove all values for

    Returns void

  • Removes a specific name/value pair

    Parameters

    • key: string

      The header name to remove

    • value: string

      The header value to remove

    Returns void

  • Set a name/value pair, replacing any existing values for the name

    Parameters

    • key: string

      The header name

    • value: string

      The header value

    Returns void

Generated using TypeDoc