nx.js
Classes

Request

Extends

  • Body

Implements

Constructors

new Request()

new Request(input, init): Request

Parameters

ParameterType
inputstring | URL | Request
initRequestInit

Returns

Request

Overrides

Body.constructor

Properties

PropertyTypeInherited from
bodynull | ReadableStream<Uint8Array>globalThis.Request.body Body.body
bodyUsedbooleanglobalThis.Request.bodyUsed Body.bodyUsed
cacheRequestCache-
credentialsRequestCredentials-
destinationRequestDestination-
headersHeadersglobalThis.Request.headers Body.headers
integritystring-
keepaliveboolean-
methodstring-
modeRequestMode-
redirectRequestRedirect-
referrerstring-
referrerPolicyReferrerPolicy-
signalAbortSignal-
urlstring-

Methods

arrayBuffer()

arrayBuffer(): Promise<ArrayBuffer>

Returns a promise that resolves with an ArrayBuffer representation of the body. If the body is null, it returns an empty ArrayBuffer.

Returns

Promise<ArrayBuffer>

Implementation of

globalThis.Request.arrayBuffer

Inherited from

Body.arrayBuffer


blob()

blob(): Promise<Blob>

Returns a promise that resolves with a Blob representation of the body. The Blob's type will be the value of the 'content-type' header.

Returns

Promise<Blob>

Implementation of

globalThis.Request.blob

Inherited from

Body.blob


clone()

clone(): Request

Returns

Request

Implementation of

globalThis.Request.clone


formData()

formData(): Promise<FormData>

Returns a promise that resolves with a FormData representation of the body. If the body cannot be decoded as form data, it throws a TypeError.

Returns

Promise<FormData>

Implementation of

globalThis.Request.formData

Inherited from

Body.formData


json()

json(): Promise<any>

Returns a promise that resolves with a JSON representation of the body. If the body cannot be parsed as JSON, it throws a SyntaxError.

Returns

Promise<any>

Implementation of

globalThis.Request.json

Inherited from

Body.json


text()

text(): Promise<string>

Returns a promise that resolves with a text representation of the body.

Returns

Promise<string>

Implementation of

globalThis.Request.text

Inherited from

Body.text

On this page