JsonRestApiResponse class

Represents a response from a successful request to a json REST API.

Implementers

Constructors

JsonRestApiResponse({required RequestMethod method, required String endpoint, required int statusCode, required String raw, Map<String, dynamic>? jsonObject, List? jsonArray})
Constructor for a new JsonRestApiResponse.

Properties

endpoint String
The endpoint this request was sent to.
final
hashCode int
The hash code for this object.
no setterinherited
jsonArray List?
Some API endpoints may return an array and not a json object. For this case, this is used.
final
jsonObject Map<String, dynamic>?
The response json if there is any
final
method RequestMethod
The http method used in this request like GET or POST.
final
raw String
The raw body response.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The returned status code which should be around 200-205
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