Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

body

body: ReadableStream | null

A simple getter used to expose a ReadableStream of the body contents.

bodyUsed

bodyUsed: boolean

Stores a Boolean that declares whether the body has been used in a response yet.

cache

Returns the cache mode associated with request, which is a string indicating how the the request will interact with the browser's cache when fetching.

credentials

credentials: RequestCredentials

Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.

destination

destination: RequestDestination

Returns the kind of resource requested by request, (e.g., document or script).

headers

headers: Headers

Returns a Headers object consisting of the headers associated with request.

Note that headers added in the network layer by the user agent will not be accounted for in this object, (e.g., the Host header).

integrity

integrity: string

Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]

isHistoryNavigation

isHistoryNavigation: boolean

Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-forward navigation).

isReloadNavigation

isReloadNavigation: boolean

Returns a boolean indicating whether or not request is for a reload navigation.

keepalive

keepalive: boolean

Returns a boolean indicating whether or not request can outlive the global in which it was created.

method

method: string

Returns request's HTTP method, which is GET by default.

mode

Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.

redirect

redirect: RequestRedirect

Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching.

A request will follow redirects by default.

referrer

referrer: string

Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and about:client when defaulting to the global's default.

This is used during fetching to determine the value of the Referer header of the request being made.

referrerPolicy

referrerPolicy: ReferrerPolicy

Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.

signal

signal: AbortSignal

Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.

url

url: string

Returns the URL of request as a string.

Methods

arrayBuffer

  • arrayBuffer(): Promise<ArrayBuffer>
  • Takes a Response stream and reads it to completion. It returns a promise that resolves with an ArrayBuffer.

    Returns Promise<ArrayBuffer>

blob

  • blob(): Promise<Blob>
  • Takes a Response stream and reads it to completion. It returns a promise that resolves with a Blob.

    Returns Promise<Blob>

clone

  • Returns Request

formData

  • Takes a Response stream and reads it to completion. It returns a promise that resolves with a FormData object.

    Returns Promise<FormData>

json

  • json(): Promise<any>
  • Takes a Response stream and reads it to completion. It returns a promise that resolves with the result of parsing the body text as JSON.

    Returns Promise<any>

text

  • text(): Promise<string>
  • Takes a Response stream and reads it to completion. It returns a promise that resolves with a USVString (text).

    Returns Promise<string>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc