LoggingInterceptor class

Middleware that logs requests and responses.

final config = ApiConfig(
  client: myClient,
  interceptors: [LoggingInterceptor()],
);
Implemented types

Constructors

LoggingInterceptor({void logger(String message) = print})
Creates a LoggingInterceptor with an optional custom logger.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
logger → void Function(String message)
Logging function. Defaults to print.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

intercept(ApiRequest request, Handler next) Future<ApiResponse>
Processes request and optionally delegates to next.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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