Interceptor class abstract
Contract every interceptor must implement.
Override only the hooks you need — the default implementations are no-ops that simply forward to the next step.
- Implementers
Constructors
- Interceptor()
-
const
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(
NetworkException error, ErrorHandler handler) → void -
Called whenever an error occurs (network, timeout, or a rejection from
onRequest / onResponse). You may call
handler.resolveto recover. -
onRequest(
RequestContext context, RequestHandler handler) → void -
Called before the request is sent. Mutate
handler.contextor callhandler.rejectto abort. -
onResponse(
ResponseContext context, ResponseHandler handler) → void -
Called after a response is received (any status code). You may call
handler.rejectto convert a response into an error. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited