Request class

Request is a data model for holding request details.

It's used to represent data from sources like APIs.

Constructors

Request({required String url, required String path, required int status, required Map<String, dynamic> header, dynamic data, dynamic log, String method = 'GET', dynamic payload, dynamic query})
Constructor with required url, path, status, and header, and optional log.

Properties

data → dynamic
The data from the request.
final
hashCode int
The hash code for this object.
no setterinherited
Headers for the request, usually containing metadata.
final
log → dynamic
Optional log data for additional information.
final
method String
HTTP method for the request, default is 'GET'.
final
path String
The path of the data source.
final
payload → dynamic
Payload data for the request.
final
query → dynamic
Query parameters for the request.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status int
The status of the request.
final
url String
The URL of the data source.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts the object to a map.
toString() String
A string representation of this object.
inherited

Operators

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