Interface FetchHeaders

The response headers. The member set mirrors the subset of the standard Headers class that this package reads.

Hierarchy

  • FetchHeaders

Methods

  • Returns an iterator over the header name-value pairs, like the standard Headers.entries. It is the iteration fallback when forEach is absent.

    Returns Iterable<[string, string]>

  • Executes the callback once for each header, with the value first. It is optional so a transport whose response headers expose no iteration can still satisfy the type.

    Parameters

    • callback: ((value, key) => void)
        • (value, key): void
        • Parameters

          • value: string
          • key: string

          Returns void

    Returns void

  • Returns the value of a header, or null when the response carries no such header. The lookup is case-insensitive, like the standard Headers.get. The client validates the declared content type through it.

    Parameters

    • name: string

    Returns null | string

Generated using TypeDoc