HttpResponseError class HTTP

An HttpResponse which represents an error from the API.

Inheritance
Implemented types

Constructors

HttpResponseError({required BaseResponse response, required HttpRequest request, required Uint8List body})
Create a new HttpResponseError.

Properties

body → Uint8List
The body of the response as it was received from the API.
finalinherited
errorCode → int
The error code of this response.
no setter
errorData ↔ HttpErrorData?
Additional information about the error, if any.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
hasJsonBody ↔ bool
Whether jsonBody contains the JSON decoded body of the response.
latefinalinherited
headers → Map<String, String>
The headers from the response.
finalinherited
jsonBody ↔ dynamic
The JSON decoded body of the response.
latefinalinherited
message → String
A message containing details about why the request failed.
no setteroverride
request → HttpRequest
The HttpRequest this response is for.
finalinherited
response → BaseResponse
The BaseResponse from package:http this HttpResponse is wrapping.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int
The status code of the response.
finalinherited
textBody ↔ String?
The UTF-8 decoded body of the response.
latefinalinherited

Methods

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

Operators

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

Static Methods

fromResponse(HttpRequest request, StreamedResponse response) → Future<HttpResponseError>
Create a new HttpResponseError from a StreamedResponse.