Options
All
  • Public
  • Public/Protected
  • All
Menu

Class HttpHeaders

Immutable set of Http headers, with lazy parsing.

Hierarchy

  • HttpHeaders

Index

Constructors

Methods

Constructors

constructor

Methods

append

  • append(name: string, value: string | string[]): HttpHeaders

delete

  • delete(name: string, value?: string | string[]): HttpHeaders

get

  • get(name: string): string | null
  • Returns first header that matches given name.

    Parameters

    • name: string

    Returns string | null

getAll

  • getAll(name: string): string[] | null
  • Returns list of header values for a given name.

    Parameters

    • name: string

    Returns string[] | null

has

  • has(name: string): boolean
  • Checks for existence of header by given name.

    Parameters

    • name: string

    Returns boolean

keys

  • keys(): string[]
  • Returns the names of the headers

    Returns string[]

set

  • set(name: string, value: string | string[]): HttpHeaders

Generated using TypeDoc