HttpRequestRecord class

An immutable HTTP request/response record captured by a TelescopeHttpAdapter.

Constructors

HttpRequestRecord({required String url, required String method, required int statusCode, required int durationMs, required bool isError, required DateTime timestamp, Map<String, String>? requestHeaders, String? requestBody, String? responseBody, bool attributedHeuristically = false, String? requestId, int? startUs, int? endUs, int? atUs, String? interactionId, String? linkedBy})

Properties

attributedHeuristically → bool
True when the adapter could not exactly match this response to its request (concurrent requests in flight). The attribution is best-effort FIFO.
final
atUs → int
Monotonic microsecond timestamp from FlutterTimeline.now, captured at construction unless the caller supplies one explicitly. Comparable across every telescope record type regardless of wall-clock skew; timestamp stays the wall-clock field for display.
final
durationMs → int
final
endUs → int?
Monotonic microsecond timestamp (from FlutterTimeline.now's clock) when the response arrived, when the capturing adapter tracks one.
final
hashCode → int
The hash code for this object.
no setterinherited
interactionId → String?
Correlates this record to others captured during the same logical interaction (a tap, a navigation), when the capturing site knows one.
final
isError → bool
final
linkedBy → String?
How interactionId was derived: zone | frame | window. window means no interaction was open at capture: interactionId is null and analysis joins the record by atUs. Null when the capturing site does not link at all.
final
method → String
final
requestBody → String?
final
requestHeaders → Map<String, String>?
final
requestId → String?
The adapter-assigned identifier that pairs this response with the request that produced it, when the capturing adapter tracks one (replacing best-effort FIFO attribution with an exact match).
final
responseBody → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startUs → int?
Monotonic microsecond timestamp (from FlutterTimeline.now's clock) when the request was sent, when the capturing adapter tracks one.
final
statusCode → int
final
timestamp → DateTime
final
url → String
final

Methods

copyWith({Map<String, String>? requestHeaders, String? requestBody, String? responseBody}) → HttpRequestRecord
Copy with the capture payload replaced; every other field, atUs included, carries over so the copy keeps its place on the trace.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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