LikeRetryInterceptor class
Performs bounded, request-local retries for safe transport failures.
Retry count and delay schedule are resolved per request from
maxAutoRetries and retryDelays extras, with LikeConstants as fallback.
Unsafe mutation methods and HTTP responses (including 429) are deliberately
excluded; rate-limit retries are owned by LikeAuthInterceptor.
Constructors
- LikeRetryInterceptor({required Dio dio, LikeRetryPolicy? policy})
Properties
- dio → Dio
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- policy → LikeRetryPolicy
-
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) → Future< void> - Called when an exception was occurred during the request.
-
onRequest(
RequestOptions options, RequestInterceptorHandler handler) → void - Called when the request is about to be sent.
-
onResponse(
Response response, ResponseInterceptorHandler handler) → void -
Called when the response is about to be resolved.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
canRetry(
DioException error) → bool -
Whether
erroris retryable and has a request-local attempt remaining. -
resolveDelays(
RequestOptions options) → List< Duration> - Resolves retry delays, preferring a request-local schedule.
-
willRetry(
DioException error) → bool -
Whether an installed retry interceptor will handle
error.
Constants
- retryCountKey → const String