File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,8 @@ class HttpClientWithInterceptor extends BaseClient {
211211 response = await Response .fromStream (stream);
212212 if (retryPolicy != null &&
213213 retryPolicy.maxRetryAttempts > _retryCount &&
214- await retryPolicy.shouldAttemptRetryOnResponse (response)) {
214+ await retryPolicy.shouldAttemptRetryOnResponse (
215+ ResponseData .fromHttpResponse (response))) {
215216 _retryCount += 1 ;
216217 return _attemptRequest (request);
217218 }
Original file line number Diff line number Diff line change 1- import 'package:http/http .dart' ;
1+ import 'package:http_interceptor/models/models .dart' ;
22
33abstract class RetryPolicy {
44 bool shouldAttemptRetryOnException (Exception reason) => false ;
5- Future <bool > shouldAttemptRetryOnResponse (Response response) async => false ;
5+ Future <bool > shouldAttemptRetryOnResponse (ResponseData response) async =>
6+ false ;
67 final int maxRetryAttempts = 1 ;
78}
You can’t perform that action at this time.
0 commit comments