cancel method
If the request is cancel then this will used to set the reason.
Implementation
@override
void cancel([dynamic reason]) {
if (!isDone) {
_logger.warning(
'($_id) Request has been cancelled (reason: ${reason.runtimeType}).',
);
_cancel.complete(RequestCancelException(reason));
if (_abortRequest != null) {
_abortRequest!(
RequestCancelException(
reason,
),
);
}
}
}