SpidrLoggingMiddleware class
A middleware that logs HTTP requests and responses to the console or developer log.
- Inheritance
-
- Object
- SpidrMiddleware
- SpidrLoggingMiddleware
Constructors
- SpidrLoggingMiddleware({bool logHeaders = false, bool logBody = false, void logger(String message) = _defaultLogger})
-
Creates a new SpidrLoggingMiddleware.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- logBody → bool
-
Whether to log the request and response body.
final
- logger → void Function(String message)
-
The custom logging function to use. Defaults to
dart:developerlog.final - logHeaders → bool
-
Whether to log the request headers.
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
-
onRequest(
SpidrRequest request) → Future< SpidrRequest> -
Intercepts and potentially alters an outgoing SpidrRequest before it is dispatched.
override
-
onResponse(
SpidrResponse response) → Future< SpidrResponse> -
Intercepts and potentially alters an incoming SpidrResponse before it is returned to the caller.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited