LoggingInterceptor class
Pretty-prints requests and responses to stdout.
- Inheritance
-
- Object
- Interceptor
- LoggingInterceptor
Constructors
- LoggingInterceptor([void log(String)?])
-
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.override -
onRequest(
RequestContext context, RequestHandler handler) → void -
Called before the request is sent. Mutate
handler.contextor callhandler.rejectto abort.override -
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.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited