Interface HttpHeaders

Common interface for a set of HTTP headers.

Hierarchy

  • HttpHeaders

Implemented by

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

    • name: 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

    • name: string

      The header name to look for

    • Optional default_value: string

      Value returned if no values are found for the given name

    Returns string

    The first header value, or default if no values exist

  • Get the list of values for the given name

    Parameters

    • name: 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

    • name: string

      The header to remove all values for

    Returns void

  • Removes a specific name/value pair

    Parameters

    • name: 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

    • name: string

      The header name

    • value: string

      The header value

    Returns void

Generated using TypeDoc