SuccessApiResponse class

A successful ApiResponse, most likely with a status code between 200 and 299.

Inheritance

Constructors

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

Properties

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

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

Static Methods

fromResponse(BaseRequest request, StreamedResponse response) Future<SuccessApiResponse>
Create a SuccessApiResponse from a StreamedResponse.