Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

cancel axios request

const cancelTokenSource = axios.CancelToken.source();

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

// Cancel request
cancelTokenSource.cancel();
 
PREVIOUS NEXT
Tagged: #cancel #axios #request
ADD COMMENT
Topic
Name
8+2 =