From 139fc513c0c96361ddfb47ab1df16314100ee437 Mon Sep 17 00:00:00 2001 From: rodich66 Date: Mon, 30 Sep 2024 11:50:24 +0000 Subject: [PATCH] up major version --- CHANGELOG.md | 3 +++ README.md | 15 +++------------ pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7550a2..40f4c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 7.0.0 +- [BREAKING CHANGE] `MultipartFileRecreatable` removed. Use a regular `MultipartFile` instead of `MultipartFileRecreatable`. + ## 6.0.0 - Updated internal libraries. - Bumped minimum Dart SDK to 3.0. diff --git a/README.md b/README.md index 6f81fb6..503c2dd 100644 --- a/README.md +++ b/README.md @@ -118,18 +118,9 @@ dio.interceptors.add( await dio.get('https://mock.codes/400'); ``` -## Retry requests with `multipart/form-data` -Because dio's class for multipart data `MultipartFile` doesn't support stream rewinding (recreation) to support retry for multipart data you should use a class `MultipartFileRecreatable` instead of `MultipartFile`. \ -Here is an example: -```dart -final formData = - FormData.fromMap({'file': MultipartFileRecreatable.fromFileSync('README.md')}); - await dio.post( - 'https://multipart.free.beeceptor.com/post500', - data: formData, - ); -``` -See the full example in the test: https://github.com/rodion-m/dio_smart_retry/blob/63a3bddae8b5a0581c35c4ae5e973996561d9100/test/multipart_retry_tests.dart#L32-L61 +## Migrating to 7.0 + +Use `MultipartFile` instead of `MultipartFileRecreatable`. ## Migrating to 6.0 diff --git a/pubspec.yaml b/pubspec.yaml index dde8996..bd6fa21 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: dio_smart_retry description: Retry library for Dio and Dio package made with love. By default, the request will be retried only for appropriate retryable http statuses. -version: 6.0.0 +version: 7.0.0 repository: https://github.com/rodion-m/dio_smart_retry issue_tracker: https://github.com/rodion-m/dio_smart_retry/issues homepage: https://github.com/rodion-m/dio_smart_retry