Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios abort request

const cancelTokenSource = axios.CancelToken.source();

axios.get('/user/12345', {
  cancelToken: cancelTokenSource.token
});

// Cancel request
cancelTokenSource.cancel();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #axios #abort #request
ADD COMMENT
Topic
Name
4+8 =