HttpRequestLog class
A single HTTP request/response log entry.
Constructors
- HttpRequestLog({required String id, required String method, required String url, int? statusCode, HttpRequestStatus status = HttpRequestStatus.pending, required DateTime startTime, DateTime? endTime, int? requestBytes, int? responseBytes, String? error})
-
HttpRequestLog.fromJson(Map<
String, dynamic> json) -
factory
Properties
- duration → Duration?
-
Elapsed duration, or
nullif still pending.no setter - durationMs → int?
-
Elapsed milliseconds, or
nullif still pending.no setter - endTime ↔ DateTime?
-
When the response was received, or
nullwhile pending.getter/setter pair - error ↔ String?
-
Error message if the request failed.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for this request.
final
- method → String
-
HTTP method (GET, POST, PUT, DELETE, etc.).
final
- requestBytes → int?
-
Size of the request body in bytes, if known.
final
- responseBytes ↔ int?
-
Size of the response body in bytes, if known.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime → DateTime
-
When the request was initiated.
final
- status ↔ HttpRequestStatus
-
Current status of this request.
getter/setter pair
- statusCode ↔ int?
-
HTTP status code of the response, or
nullwhile pending.getter/setter pair - url → String
-
Full request URL.
final
Methods
-
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