HttpExchange class

Aggregated request/response pair, identified by a stable id.

Constructors

HttpExchange({required String id, required RequestData request, ResponseData? response, ErrorData? error})
Creates a new HttpExchange.
const
HttpExchange.fromJson(Map<String, Object?> json)
Reconstructs an HttpExchange from its JSON representation.
factory

Properties

duration Duration?
Time elapsed for the exchange, when known.
no setter
error ErrorData?
Error snapshot, when the call failed.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Stable identifier shared between the request, the response and the error halves of the same exchange.
final
request RequestData
Outbound request snapshot.
final
response ResponseData?
Inbound response snapshot, when the call completed successfully.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ExchangeStatus
Resolves the exchange lifecycle status.
no setter

Methods

copyWith({RequestData? request, ResponseData? response, ErrorData? error}) HttpExchange
Returns a copy with the provided overrides applied.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
JSON representation used for DevTools transport.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited