ErrorApiResponse class

An ApiResponse that represents an error.

Inheritance
Implemented types
Implementers

Constructors

ErrorApiResponse({required StreamedResponse inner, required Uint8List bodyBytes, required BaseRequest request, String? additionalInformation})
Create a new ErrorApiResponse.
ErrorApiResponse.withMessage(ErrorApiResponse inner, {String? additionalInformation, int? statusCode, String? reasonPhrase})
Create an ErrorApiResponse with a message displayed in toString.
factory

Properties

additionalInformation → String?
Additional information associated with the error.
final
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<ErrorApiResponse>
Create an ErrorApiResponse from a StreamedResponse.