ResponseData class
Response object, internally used by the library.
The network request is received it is broken down into pieces to be used by the library.
You can also modify every ResponseData
after every response is received. For Example, if you want to only deal with data
of the response.
class Logger extends MiddlewareContract {
@override
void interceptRequest(RequestData data) {
@override
void interceptResponse(ResponseData data) {
//Unwrapping response from a structure
data.body = jsonDecode(data.body)["data"];
}
@override
void interceptError(err) {
}
}
Constructors
Properties
- body ↔ String
-
getter/setter pair
-
bodyBytes
↔ List<
int> ? -
getter/setter pair
- contentLength ↔ int?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, String> ? -
getter/setter pair
- isRedirect ↔ bool?
-
getter/setter pair
- method ↔ Method
-
getter/setter pair
- persistentConnection ↔ bool?
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode ↔ int
-
getter/setter pair
- url ↔ String
-
getter/setter pair
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