Request extension type

The Request interface of the Fetch API represents a resource request.

You can create a new Request object using the Request.Request constructor, but you are more likely to encounter a Request object being returned as the result of another API operation, such as a service worker FetchEvent.request.

on
Implemented types

Constructors

Request(RequestInfo input, [RequestInit init])
factory

Properties

body ReadableStream?
no setter
bodyUsed bool
no setter
cache RequestCache
no setter
credentials RequestCredentials
no setter
destination RequestDestination
no setter
duplex RequestDuplex
no setter
hashCode int
The hash code for this object.
no setterinherited
headers Headers
no setter
integrity String
no setter
isHistoryNavigation bool
no setter
isReloadNavigation bool
no setter
keepalive bool
no setter
method String
no setter
mode RequestMode
no setter
redirect RequestRedirect
no setter
referrer String
no setter
referrerPolicy ReferrerPolicy
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signal AbortSignal
no setter
url String
no setter

Methods

arrayBuffer() JSPromise<JSArrayBuffer>
The arrayBuffer() method of the Request interface reads the request body and returns it as a promise that resolves with an ArrayBuffer.
blob() JSPromise<Blob>
The blob() method of the Request interface reads the request body and returns it as a promise that resolves with a Blob.
clone() Request
The clone() method of the Request interface creates a copy of the current Request object.
formData() JSPromise<FormData>
The formData() method of the Request interface reads the request body and returns it as a promise that resolves with a FormData object.
json() JSPromise<JSAny?>
The json() method of the Request interface reads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
text() JSPromise<JSString>
The text() method of the Request interface reads the request body and returns it as a promise that resolves with a String. The response is always decoded using UTF-8.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited