ApiResponse class abstract

A Response from an ApiClient.

Helps deserializing requests and provides toString support.

Implementers

Constructors

ApiResponse.new({required StreamedResponse inner, required Uint8List bodyBytes, required BaseRequest request})
Create a new ApiResponse.

Properties

body String
The body of the response as a string.
latefinal
bodyBytes Uint8List
The bytes comprising the body of this response.
final
contentLength int?
The size of the response body, in bytes.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasJsonBody bool
Whether the body of the request was parseable as JSON.
no setter
headers Map<String, String>
The HTTP headers returned by the server.
final
inner → StreamedResponse
The response from the inner http client.
final
isRedirect bool
no setter
jsonBody → dynamic
The body of the request deserialized as JSON.
no setter
persistentConnection bool
Whether the server requested that a persistent connection be maintained.
no setter
reasonPhrase String?
The reason phrase associated with the status code.
no setter
request → BaseRequest
The (frozen) request that triggered this response.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The HTTP status code for this response.
final
stream → ByteStream
The stream from which the response body data can be read.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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