HTTPDioLoggerInterceptor class
A Dio interceptor that logs HTTP requests and responses using an InMemoryLogger.
This interceptor captures HTTP request and response data, as well as errors, and logs them for later review. It's designed to integrate with Dio, a powerful HTTP client for Dart, to enable detailed tracking of network activity within an application.
Constructors
- HTTPDioLoggerInterceptor({required InMemoryLogger logger})
-
Creates an instance of
HTTPDioLoggerInterceptor
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → InMemoryLogger
-
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 - Intercepts and logs HTTP errors.
-
onRequest(
RequestOptions options, RequestInterceptorHandler handler) → void - Intercepts and logs outgoing HTTP requests.
-
onResponse(
Response response, ResponseInterceptorHandler handler) → void - Intercepts and logs incoming HTTP responses.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited