checkForCancellation method
Check if this request has been canceled.
Implementation
void checkForCancellation({BaseResponse? response}) {
if (isCanceled) {
final error = RequestException(method, uri, this, response,
_cancellationError ?? Exception('Request canceled'));
autoRetry.failures.add(error);
throw error;
}
}