DebugNetworkRequest class

Represents a network request.

Constructors

DebugNetworkRequest({required String id, required String url, required HttpMethod method, required Map<String, dynamic> headers, required DateTime requestTime, dynamic body, int? statusCode, Map<String, dynamic>? responseHeaders, dynamic responseBody, DateTime? responseTime, int? durationMs, String? errorMessage, bool isLoading = false})
Creates a new network request.
const

Properties

body → dynamic
Request body.
final
durationMs int?
Response time in milliseconds.
final
durationString String
Get formatted duration string.
no setter
errorMessage String?
Error message if request failed.
final
formattedHeaders String
Get formatted headers.
no setter
formattedRequestBody String
Get formatted request body.
no setter
formattedResponseBody String
Get formatted response body.
no setter
formattedResponseHeaders String
Get formatted response headers.
no setter
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
Request headers.
final
id String
Unique identifier for the request.
final
isError bool
Check if the request had an error.
no setter
isLoading bool
Whether the request is loading.
final
isSuccess bool
Check if the request was successful.
no setter
method HttpMethod
HTTP method.
final
queryParams String?
Get query parameters.
no setter
requestTime DateTime
Request timestamp.
final
responseBody → dynamic
Response body.
final
responseHeaders Map<String, dynamic>?
Response headers.
final
responseTime DateTime?
Response timestamp.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortUrl String
Get short URL path.
no setter
statusCode int?
Response status code.
final
url String
Request URL.
final

Methods

copyWith({String? id, String? url, HttpMethod? method, Map<String, dynamic>? headers, dynamic body, DateTime? requestTime, int? statusCode, Map<String, dynamic>? responseHeaders, dynamic responseBody, DateTime? responseTime, int? durationMs, String? errorMessage, bool? isLoading}) DebugNetworkRequest
Create a copy with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
Convert to JSON string.
toMap() Map<String, dynamic>
Convert to a map.
toString() String
A string representation of this object.
inherited

Operators

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