Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Index

Constructors

constructor

  • Constructor for an HTTP response.

    Parameters

    • body: null | ArrayBuffer

      The initial content of the response Body.

    • init: ResponseInit

      The Request configuration object.

    Returns Response

Accessors

bodyUsed

  • get bodyUsed(): boolean
  • Returns boolean

    A boolean representing whether the Body has been consumed already or not.

headers

  • Get the Response headers.

    Returns Headers

    A Headers object of the HTTP response headers, for the Request.

ok

  • get ok(): boolean
  • Get if the response was ok/successful.

    Returns boolean

    a boolean that is true if the response was successful, false if not.

status

  • get status(): number
  • Get the HTTP status of the response.

    Returns number

    an unsigned 16 bit integer of the status code.

statusText

  • get statusText(): string
  • Get the text assosciated with the status code of the response.

    Returns string

    a string associated with the status text for the response status code.

url

  • get url(): string
  • Get the URL of where the response came from.

    Returns string

    a string of the URL.

Methods

arrayBuffer

  • arrayBuffer(): null | ArrayBuffer
  • Returns null | ArrayBuffer

    an ArrayBuffer for the Body content (if it contains one).

text

  • text(): string
  • Returns string

    a string representation of the Body ArrayBuffer content.

Legend

Generated using TypeDoc