File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ class InterceptedClient extends BaseClient {
215
215
216
216
@override
217
217
Future <StreamedResponse > send (BaseRequest request) async {
218
- final response = await _attemptRequest (request);
218
+ final response = await _attemptRequest (request, isStream : true );
219
219
220
220
final interceptedResponse = await _interceptResponse (response);
221
221
@@ -266,7 +266,8 @@ class InterceptedClient extends BaseClient {
266
266
267
267
/// Attempts to perform the request and intercept the data
268
268
/// of the response
269
- Future <BaseResponse > _attemptRequest (BaseRequest request) async {
269
+ Future <BaseResponse > _attemptRequest (BaseRequest request,
270
+ {bool isStream = false }) async {
270
271
BaseResponse response;
271
272
try {
272
273
// Intercept request
@@ -278,8 +279,7 @@ class InterceptedClient extends BaseClient {
278
279
.send (interceptedRequest)
279
280
.timeout (requestTimeout! , onTimeout: onRequestTimeout);
280
281
281
- response =
282
- request is Request ? await Response .fromStream (stream) : stream;
282
+ response = isStream ? stream : await Response .fromStream (stream);
283
283
284
284
if (retryPolicy != null &&
285
285
retryPolicy! .maxRetryAttempts > _retryCount &&
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ environment:
11
11
sdk : " >=3.0.3 <4.0.0"
12
12
13
13
dependencies :
14
- http : ^1.0 .0
14
+ http : ^1.1 .0
15
15
16
16
dev_dependencies :
17
17
lints : ^2.1.1
You can’t perform that action at this time.
0 commit comments