mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
Adding Canceler parameters config and request (#4711)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -49,13 +49,13 @@ function CancelToken(executor) {
|
||||
return promise;
|
||||
};
|
||||
|
||||
executor(function cancel(message) {
|
||||
executor(function cancel(message, config, request) {
|
||||
if (token.reason) {
|
||||
// Cancellation has already been requested
|
||||
return;
|
||||
}
|
||||
|
||||
token.reason = new CanceledError(message);
|
||||
token.reason = new CanceledError(message, config, request);
|
||||
resolvePromise(token.reason);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user