RequestResponse<OriginalResponse> class
A standardized response object returned by RemoteDriver.
This class acts as an Adapter, encapsulating the response data from any underlying HTTP client (such as Dio, http, or Chopper) into a format that DatasourceRemote can process consistently.
Constructors
-
RequestResponse({required int statusCode, required OriginalResponse originalResponse, String body()?, Map<
String, String> headers = const {}}) -
A standardized response object returned by RemoteDriver.
const
Properties
- body → String Function()?
-
The raw body of the response.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
The HTTP response headers returned by the server.
final
- originalResponse → OriginalResponse
-
The original response object from the underlying library.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
The HTTP status code (e.g., 200, 404, 500).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited