Response class
Response class represents responses which are received by page.
Constructors
- Response(NetworkApi _networkApi, Request request, ResponseData data)
- Response.aborted(DevTools apis, Request? request)
-
factory
Properties
-
bytes
→ Future<
List< int> > -
Promise which resolves to the bytes with response body.
no setter
- content → Future?
-
no setter
- data → ResponseData
-
final
- frame → Frame?
-
A Frame that initiated this response, or
null
if navigating to error pages.no setter - fromCache → bool
-
True if the response was served from either the browser's disk cache or
memory cache.
no setter
- fromDiskCache → bool
-
no setter
- fromServiceWorker → bool
-
True if the response was served by a service worker.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
An object with HTTP headers associated with the response.
no setter
- json → Future
-
This method will throw if the response body is not parsable via
jsonDecode
.no setter - ok → bool
-
Contains a boolean stating whether the response was successful (status in
the range 200-299) or not.
no setter
- remoteIPAddress → String?
-
The IP address of the remote server
no setter
- remotePort → int?
-
The port used to connect to the remote server
no setter
- request → Request
-
A matching Request object.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- securityDetails → SecurityDetails?
-
Security details if the response was received over the secure connection,
or
null
otherwise.no setter - status → int
-
Contains the status code of the response (e.g., 200 for a success).
no setter
- statusText → String
-
Contains the status text of the response (e.g. usually an "OK" for a success).
no setter
-
text
→ Future<
String> -
Promise which resolves to a text representation of response body.
no setter
- url → String
-
Contains the URL of the response.
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