ApiCallRecord class

Lightweight record of a single captured API call.

Constructors

ApiCallRecord({required String id, required String method, required String url, required String curl, required int statusCode, required DateTime timestamp, required Duration duration, dynamic requestBody, dynamic responseBody, String? errorMessage, String? stackTrace})
Creates an ApiCallRecord.

Properties

curl String
Reconstructed cURL command for this request.
final
duration Duration
Elapsed time from request dispatch to response/error.
final
errorMessage String?
Best-effort error message when the call failed (timeouts, socket errors, non-2xx, etc).
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for this record (microseconds since epoch as a string).
final
method String
HTTP method (e.g. GET, POST).
final
requestBody → dynamic
Decoded request body, if any.
final
responseBody → dynamic
Decoded response body, if any.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace String?
Best-effort captured stack trace (when available).
final
statusCode int
HTTP response status code, or 0 when no response was received.
final
timestamp DateTime
Wall-clock time when the request completed (or errored).
final
url String
Full request URI as a string.
final

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