Options
All
  • Public
  • Public/Protected
  • All
Menu

Export the as-fetch Fetch API that we can use with Fastly.

Hierarchy

  • Headers

Index

Constructors

constructor

Methods

Private _headerNameToLowercase

  • _headerNameToLowercase(name: string): string
  • Parameters

    • name: string

    Returns string

append

  • append(name: string, value: string): void
  • Append a header value to a given name.

    Parameters

    • name: string

      The name of the HTTP header to set.

    • value: string

      The value of the HTTP header to set.

    Returns void

delete

  • delete(name: string): void
  • Remove a header from from the Header instance.

    Parameters

    • name: string

      The name of the HTTP header you want to remove from the Header instance.

    Returns void

get

  • get(name: string): null | string
  • Get the value of a header by it's name.

    Parameters

    • name: string

      string of the name of the header value you would want.

    Returns null | string

    the value associated with the header name if it exists.

has

  • has(name: string): boolean
  • Checks for header name existance.

    Parameters

    • name: string

      The name of the HTTP header you want to know if exists on the headers instance.

    Returns boolean

    a boolean of whether or not the header exists.

keys

  • keys(): string[]
  • Get all of the Header instance's names/keys.

    Returns string[]

    an Array of strings containing all of the names/keys on the Header instance.

set

  • set(name: string, value: string): void
  • Set or Override a header of a given name.

    Parameters

    • name: string

      The name of the HTTP header to set.

    • value: string

      The value of the HTTP header to set.

    Returns void

values

  • values(): string[][]
  • Get all of the Header instance's values.

    Returns string[][]

    an Array of Array of strings containing all of the values for each name on a Header instance.

Legend

Generated using TypeDoc