BasicRestResponse class

Concrete RestResponse used by adapters and tests.

Implemented types

Constructors

BasicRestResponse({required int statusCode, required RestRequest request, Map<String, String> headers = const <String, String>{}, Object? data, List<int>? bodyBytes, String? bodyString})
Creates a basic response.
const

Properties

bodyBytes List<int>?
Raw response bytes when available.
final
bodyString String?
Response body as string when available.
final
data Object?
Decoded body when available (JSON map/list, string, etc.).
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Response headers. Multi-valued headers are joined or listed by adapter.
final
isSuccess bool
Whether statusCode indicates success (typically 2xx).
no setteroverride
request RestRequest
The request that produced this response.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
HTTP status code.
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