getUpdatedRequest method
- @override
- @protected
- BaseRequest originalRequest,
- BaseRequest lastRequest,
- FinalizedBodyStreamCallback bodyStream,
- BaseResponse? response,
- int retryCount,
override
Returns an updated request that should be retried
Implementation
@override
@protected
FutureOr<BaseRequest> getUpdatedRequest(
BaseRequest originalRequest,
BaseRequest lastRequest,
FinalizedBodyStreamCallback bodyStream,
BaseResponse? response,
int retryCount,
) {
final updateRequest = this.updateRequest;
if (updateRequest != null) {
return updateRequest(
originalRequest,
lastRequest,
bodyStream,
response,
retryCount,
);
}
return super.getUpdatedRequest(
originalRequest,
lastRequest,
bodyStream,
response,
retryCount,
);
}