DebugDioInterceptor class

An Interceptor that records all requests and responses in a NetworkRequestCollection.

Add it after interceptors that modify requests or responses, so that it records what is actually sent and received:

dio.interceptors.add(DebugDioInterceptor(networkRequests));

Constructors

DebugDioInterceptor(NetworkRequestCollection requests, {int maximumBodyLength = 1024 * 1024})

Properties

hashCode → int
The hash code for this object.
no setterinherited
maximumBodyLength → int
The maximum number of characters of each request and response body that are stored; longer bodies are truncated in the log (but not on the wire).
final
requests → NetworkRequestCollection
final
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(DioException err, ErrorInterceptorHandler handler) → void
Called when an exception was occurred during the request.
onRequest(RequestOptions options, RequestInterceptorHandler handler) → void
Called when the request is about to be sent.
onResponse(Response response, ResponseInterceptorHandler handler) → void
Called when the response is about to be resolved.
toString() → String
A string representation of this object.
inherited

Operators

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