ApiInterceptor class
Default API interceptor with optional logging and override hooks.
- Inheritance
-
- Object
- UnifiedInterceptor
- ApiInterceptor
Constructors
-
ApiInterceptor({bool showLogs = false, FutureOr<
UnifiedRequest> onRequestOverride(UnifiedRequest)?, FutureOr<UnifiedResponse> onResponseOverride(UnifiedResponse)?, FutureOr<UnifiedError> onErrorOverride(UnifiedError)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onErrorOverride
→ FutureOr<
UnifiedError> Function(UnifiedError)? -
final
-
onRequestOverride
→ FutureOr<
UnifiedRequest> Function(UnifiedRequest)? -
final
-
onResponseOverride
→ FutureOr<
UnifiedResponse> Function(UnifiedResponse)? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showLogs → bool
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
UnifiedError error) → FutureOr< UnifiedError> -
override
-
onRequest(
UnifiedRequest request) → FutureOr< UnifiedRequest> -
override
-
onResponse(
UnifiedResponse response) → FutureOr< UnifiedResponse> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited