HTTPResponseData<DataType> class

Represents the data structure for HTTP response data.

This class holds details of an HTTP response, including headers, status code, response data, and any error messages or status messages.

Constructors

HTTPResponseData({required Map<String, dynamic> headers, required int statusCode, required DataType data, String? error, String? statusMessage})

Properties

createdAt DateTime
final
data → DataType
final
error String?
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
final
prettyData String
Provides a human-readable representation of the response data. If the data is a Map, it's formatted by prettyMap; otherwise, it's converted to a string.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
final
statusMessage String?
final

Methods

copyWith({Map<String, dynamic>? headers, int? statusCode, DataType? data, String? statusMessage, String? error}) HTTPResponseData
Creates a copy of this HTTPResponseData with the given parameters, allowing for modification of certain fields while keeping others from the original object.
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