RetryConfig class
Configuration for automatic HTTP request retries with exponential backoff.
Constructors
-
RetryConfig({int maxRetries = 3, Duration baseDelay = const Duration(milliseconds: 500), Duration maxDelay = const Duration(seconds: 16), Set<
int> retryableStatusCodes = const {429, 502, 503, 504}, bool enabled = true}) -
const
- RetryConfig.disabled()
-
Disables retries entirely.
const
Properties
- baseDelay → Duration
-
final
- enabled → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxDelay → Duration
-
final
- maxRetries → int
-
final
-
retryableStatusCodes
→ Set<
int> -
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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited