FFApiCall class

A single captured HTTP request + response pair.

Annotations

Constructors

FFApiCall({required String id, required String method, required String url, required DateTime requestTime, Map<String, Object?> requestHeaders = const <String, Object?>{}, Object? requestBody, Map<String, Object?> queryParameters = const <String, Object?>{}, FFApiCallStatus status = FFApiCallStatus.pending, int? statusCode, Map<String, Object?> responseHeaders = const <String, Object?>{}, Object? responseBody, DateTime? responseTime, String? error, String? stackTrace, String? curl})
Creates a call. id is client-generated so it can be referenced in UI updates before the response arrives.
const

Properties

curl → String?
cURL reproduction of the request.
final
durationMs → int?
Duration in milliseconds, or null while pending.
no setter
error → String?
Error message if the call failed.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable ID (monotonic int as string).
final
isFailed → bool
Whether the call failed (non-2xx, or exception).
no setter
isSuccess → bool
Whether the call has a 2xx response.
no setter
method → String
HTTP method (GET, POST, ...).
final
queryParameters → Map<String, Object?>
Masked query parameters.
final
requestBody → Object?
Masked request body.
final
requestHeaders → Map<String, Object?>
Masked request headers.
final
requestTime → DateTime
Time the request was sent.
final
responseBody → Object?
Response body.
final
responseHeaders → Map<String, Object?>
Response headers.
final
responseTime → DateTime?
Time the response arrived, if any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTrace → String?
Stack trace if the call failed.
final
status → FFApiCallStatus
Current lifecycle state.
final
statusCode → int?
HTTP status code, if available.
final
url → String
Absolute URL, with sensitive query params masked.
final

Methods

copyWith({FFApiCallStatus? status, int? statusCode, Map<String, Object?>? responseHeaders, Object? responseBody, DateTime? responseTime, String? error, String? stackTrace, String? curl}) → FFApiCall
Returns a new call with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
JSON representation suitable for AI snapshots.
toString() → String
A string representation of this object.
inherited

Operators

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