Options
All
  • Public
  • Public/Protected
  • All
Menu

EnvoyResponse is a little enhanced from the original Response of node-fetch

Hierarchy

  • Response
    • EnvoyResponse

Index

Constructors

constructor

  • new EnvoyResponse(body?: BodyInit, init?: ResponseInit): EnvoyResponse
  • Parameters

    • Optional body: BodyInit
    • Optional init: ResponseInit

    Returns EnvoyResponse

Properties

body

body: ReadableStream

bodyUsed

bodyUsed: boolean

headers

headers: Headers

ok

ok: boolean

overloaded

overloaded: boolean

Envoy will set this header on the downstream response if a request was dropped due to either maintenance mode or upstream circuit breaking.

redirected

redirected: boolean

size

size: number

status

status: number

statusText

statusText: string

timeout

timeout: number

type

upstreamServiceTime

upstreamServiceTime: number

Contains the time in milliseconds spent by the upstream host processing the request. This is useful if the client wants to determine service time compared to network latency. This header is set on responses.

url

url: string

Methods

arrayBuffer

  • arrayBuffer(): Promise<ArrayBuffer>
  • Returns Promise<ArrayBuffer>

blob

  • blob(): Promise<Blob>
  • Returns Promise<Blob>

buffer

  • buffer(): Promise<Buffer>
  • Returns Promise<Buffer>

clone

  • clone(): Response
  • Returns Response

json

  • json(): Promise<any>
  • Returns Promise<any>

text

  • text(): Promise<string>
  • Returns Promise<string>

textConverted

  • textConverted(): Promise<string>

Static error

  • error(): Response
  • Returns Response

Static redirect

  • redirect(url: string, status: number): Response
  • Parameters

    • url: string
    • status: number

    Returns Response

Legend

  • Constructor
  • Property
  • Method
  • Private property
  • Private method
  • Property
  • Inherited property

Generated using TypeDoc