RetryInterceptor class
Response interceptor for retry logic
- Inheritance
-
- Object
- Interceptor
- RetryInterceptor
Constructors
- RetryInterceptor({int maxRetries = 3, Duration retryDelay = const Duration(seconds: 1), bool shouldRetry(AxiosError error)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxRetries → int
-
final
- retryDelay → Duration
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldRetry → bool Function(AxiosError error)?
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
AxiosError error) → FutureOr< void> -
Called when an error occurs
override
-
onRequest(
AxiosRequest request) → FutureOr< AxiosRequest> -
Called before the request is sent
inherited
-
onResponse(
AxiosResponse response) → FutureOr< AxiosResponse> -
Called when the response is received
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited