Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios cancel request

//Starting from v0.22.0 Axios supports AbortController to cancel requests in fetch API way:

const controller = new AbortController();

axios.get('/foo/bar', {
   signal: controller.signal
}).then(function(response) {
   //...
});
// cancel the request
controller.abort()
Source by axios-http.com #
 
PREVIOUS NEXT
Tagged: #axios #cancel #request
ADD COMMENT
Topic
Name
6+3 =