ResponseData class
Snapshot of an inbound HTTP response.
Constructors
-
ResponseData({required int statusCode, required Map<
String, String> headers, required DateTime timestamp, required Duration duration, Object? body, String? contentType, String? statusMessage}) -
Creates a new ResponseData snapshot.
const
-
ResponseData.fromJson(Map<
String, Object?> json) -
Reconstructs a ResponseData from its JSON representation.
factory
Properties
- body → Object?
-
Response body, already serialised to a transport friendly form.
final
- contentType → String?
-
Resolved content type, when known.
final
- duration → Duration
-
Time elapsed between request issue and response completion.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
Response headers.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
HTTP status code.
final
- statusMessage → String?
-
Status text returned by the server.
final
- timestamp → DateTime
-
Local clock when the response completed.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Converts the response to a JSON map for transport.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited