Response class
The interface of the Fetch API represents the response to a
request.
You can create a new object using the Response.Response()
constructor, but you are more likely to encounter a object being
returned as the result of another API operation—for example, a
service worker FetchEvent.respondWith
, or a simple fetch()
.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Response([dynamic body, ResponseInit? init])
-
factory
Properties
- body → ReadableStream?
-
Available on Body, provided by the PropsBody extension
no setter - bodyUsed → bool
-
Available on Body, provided by the PropsBody extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- headers → Headers
-
Available on Response, provided by the PropsResponse extension
no setter - ok → bool
-
Available on Response, provided by the PropsResponse extension
no setter - redirected → bool
-
Available on Response, provided by the PropsResponse extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int
-
Available on Response, provided by the PropsResponse extension
no setter - statusText → String
-
Available on Response, provided by the PropsResponse extension
no setter - type → ResponseType
-
Available on Response, provided by the PropsResponse extension
no setter - url → String
-
Available on Response, provided by the PropsResponse extension
no setter
Methods
-
arrayBuffer(
) → Future< ByteBuffer> -
blob(
) → Future< Blob> -
clone(
) → Response -
Available on Response, provided by the PropsResponse extension
-
formData(
) → Future< FormData> -
json(
) → Future -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
text(
) → Future< String> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited