RequestException class

An exception that is raised when a response to a request returns with an unsuccessful status code.

Implemented types

Constructors

RequestException(String? method, Uri uri, BaseRequest? request, BaseResponse? response, [Object? error])
Construct a new instance of RequestException using information from an HTTP request and response.

Properties

error Object?
Original error, if any.
final
hashCode int
The hash code for this object.
no setterinherited
message String
Descriptive error message that includes the request method & URL and the response status.
no setter
method String?
HTTP method.
final
request BaseRequest?
Failed request.
final
response BaseResponse?
Response to the failed request (some of the properties may be unavailable).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri
URL of the attempted/unsuccessful request.
final

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