Request class
This Fetch API interface represents a resource request.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Request(Object input, [RequestInit? init])
-
factory
Properties
-
arrayBuffer
↔ Future<
ByteBuffer> Function() -
Available on Body, provided by the Body$Typings extension
getter/setter pair -
blob
↔ Future<
Blob> Function() -
Available on Body, provided by the Body$Typings extension
getter/setter pair -
body
→ ReadableStream<
Uint8List> ? -
Available on Body, provided by the Body$Typings extension
A simple getter used to expose aReadableStream
of the body contents.no setter - bodyUsed → bool
-
Available on Body, provided by the Body$Typings extension
Stores aBoolean
that declares whether the body has been used in a response yet.no setter - cache → RequestCache
-
Available on Request, provided by the Request$Typings extension
Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.no setter - clone ↔ Request Function()
-
Available on Request, provided by the Request$Typings extension
getter/setter pair - credentials → RequestCredentials
-
Available on Request, provided by the Request$Typings extension
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.no setter - destination → RequestDestination
-
Available on Request, provided by the Request$Typings extension
Returns the kind of resource requested by request, e.g., "document" or "script".no setter -
formData
↔ Future<
FormData> Function() -
Available on Body, provided by the Body$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- headers → Headers
-
Available on Request, provided by the Request$Typings extension
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.no setter - integrity → String
-
Available on Request, provided by the Request$Typings extension
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
no setter -
Available on Request, provided by the Request$Typings extension
Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-forward navigation).no setter -
Available on Request, provided by the Request$Typings extension
Returns a boolean indicating whether or not request is for a reload navigation.no setter - json ↔ Future Function()
-
Available on Body, provided by the Body$Typings extension
getter/setter pair - keepalive → bool
-
Available on Request, provided by the Request$Typings extension
Returns a boolean indicating whether or not request can outlive the global in which it was created.no setter - method → String
-
Available on Request, provided by the Request$Typings extension
Returns request's HTTP method, which is "GET" by default.no setter - mode → RequestMode
-
Available on Request, provided by the Request$Typings extension
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.no setter - redirect → RequestRedirect
-
Available on Request, provided by the Request$Typings extension
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.no setter - referrer → String
-
Available on Request, provided by the Request$Typings extension
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 theReferer
header of the request being made.no setter - referrerPolicy → ReferrerPolicy
-
Available on Request, provided by the Request$Typings extension
Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- signal → AbortSignal
-
Available on Request, provided by the Request$Typings extension
Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.no setter -
text
↔ Future<
String> Function() -
Available on Body, provided by the Body$Typings extension
getter/setter pair - url → String
-
Available on Request, provided by the Request$Typings extension
Returns the URL of request as a string.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited