dio_retry_it 8.0.1
dio_retry_it: ^8.0.1 copied to clipboard
Retry library for Dio and Dio package made with love. By default, the request will be retried only for appropriate retryable http statuses.
8.0.1 #
- Improve code quality and fix dart analyze issues
8.0.0 #
- [BREAKING CHANGE] Complete redesign of retry strategy from fixed delays to exponential backoff with full jitter
- [BREAKING CHANGE] Removed
retryDelaysparameter - replaced withbaseDelay,maxDelay, andbackoffFactor - [BREAKING CHANGE] Renamed
retriesparameter tomaxAttemptsfor clarity - [BREAKING CHANGE] Removed
retryableExtraStatusesparameter - use customretryEvaluatorinstead - [BREAKING CHANGE] Removed
ignoreRetryEvaluatorExceptionsparameter - built-in error handling - [BREAKING CHANGE] Removed
MultipartFileRecreatable- use regularMultipartFilewith automatic cloning - [NEW] Exponential backoff with full jitter prevents thundering herd problems
- [NEW] Automatic FormData cloning - no manual recreation needed
- [NEW] Better logging with attempt count and delay information
- [IMPROVED] Better error handling in retry evaluator
- [IMPROVED] Enhanced documentation with examples
- [IMPROVED] Full null safety with modern Dart practices
Migration Guide #
Replace fixed delays with exponential backoff:
Before:
RetryInterceptor(
dio: dio,
retries: 3,
retryDelays: [Duration(seconds: 1), Duration(seconds: 2), Duration(seconds: 3)],
)
After:
RetryInterceptor(
dio: dio,
maxAttempts: 3,
baseDelay: Duration(seconds: 1),
maxDelay: Duration(seconds: 10),
backoffFactor: 2.0,
)
7.0.0 #
- [BREAKING CHANGE]
MultipartFileRecreatableremoved. Use a regularMultipartFileinstead ofMultipartFileRecreatable.
6.0.0 #
- Updated internal libraries.
- Bumped minimum Dart SDK to 3.0.
- Added
MultipartFileRecreatabledocumentation. - Refactors static constructors to factories.
- Adds a new
MultipartFileRecreatable.fromBytesfactory compatible with web. - Added a new
headersparameter. - You can now read the file's content with
MultipartFileRecreatable.data. - Breaking:
MultipartFileRecreatable.filenameis now a named parameter to matchdio. - Breaking: Removed
MultipartFileRecreatable.filePathsince it was not being used internally.
5.0.0 #
- Add supporting of the new dio 5.+
1.4.0 #
- Add supporting of retrying for requests with
multipart/form-data, useMultipartFileRecreatableclass for that (details). DefaultRetryEvaluatorand status codes constants from the filehttp_status_codes.dartwas made a part of the public API.
1.3.2 #
- Add a feature allowing to specify extra retryable status codes (parameter
retryableExtraStatuses) (#11) - Add a request's
CancelTokenchecking - Update dependencies
1.2.0 #
- Add properly an incorrect url scheme error handling in the default retry evaluator (#2)
1.1.0 #
- A request catching is fixed (#1)
- Dependencies were updated
1.0.3 #
- Example updated
1.0.2 #
- Initial version.