Skip to content

Commit 397f68c

Browse files
committed
# 4.0.2
- Add QueuedInterceptor - merge cfug#1316 cfug#1317
1 parent e45bb5c commit 397f68c

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

dio/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#4.0.2
2+
- Add QueuedInterceptor
3+
- merge #1316 #1317
14

25
# 4.0.1
36
- merge pr #1177 #1196 #1205 #1224 #1225 #1227 #1256 #1263 #1291
@@ -16,7 +19,7 @@ stable version
1619

1720
# 4.0.0-prev1
1821

19-
**Interceptors:** Add `handler` for Interceptor APIs which can specify the subsequent interceptors processing logic more finely(whether to skip them or not)
22+
**Interceptors:** Add `handler` for Interceptor APIs which can specify the subsequent interceptors processing logic more finely(whether to skip them or not)
2023

2124
# 4.0.0-beta7
2225

dio/lib/src/dio_mixin.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -585,12 +585,11 @@ abstract class DioMixin implements Dio {
585585
RequestInterceptorHandler handler,
586586
) {
587587
requestOptions = reqOpt;
588-
_dispatchRequest(reqOpt).then(
589-
(value) => handler.resolve(value, true),
590-
onError: (e) {
591-
handler.reject(e as DioError, true);
592-
},
593-
);
588+
_dispatchRequest(reqOpt)
589+
.then((value) => handler.resolve(value, true))
590+
.catchError((e) {
591+
handler.reject(e as DioError, true);
592+
});
594593
}));
595594

596595
// Add response interceptors to request flow

dio/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dio
22
description: A powerful Http client for Dart, which supports Interceptors, FormData, Request Cancellation, File Downloading, Timeout etc.
3-
version: 4.0.2-beta1
3+
version: 4.0.2
44
homepage: https://github.com/flutterchina/dio
55

66
environment:

0 commit comments

Comments
 (0)