RestInterceptor class abstract

Refit/OkHttp-style interceptor. Lets you transform requests (e.g. add an Authorization header) and responses (e.g. refresh a token on 401).

Implementers

Constructors

RestInterceptor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(RestException error) Future<RestException>
Called when the request fails (network error or non-success status code).
onRequest(RestRequest request) Future<RestRequest>
Called before the request is sent. Returns the (possibly modified) request, or throws a RestException to abort the call.
onResponse(RestResponse response) Future<RestResponse>
Called after the response is received (including error responses).
toString() String
A string representation of this object.
inherited

Operators

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