does axios have an equivalent to jQuery `when`?
See original GitHub issueSummary
$.when(data)
can directly resolve data as promise. Does axios have an equivalent? Or I have to use a promise library like bluebird
to do this?
Context
- axios version: 0.17.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
jquery ajaxComplete equivalent in axios
jQuery's $.ajax has a function build in where it fires an event when a request has been finished. This is the ajaxComplete event....
Read more >jQuery, Ajax, Axios
Axios is a promise-based HTTP Client for node.js and the browser. It is isomorphic (= it can run in the browser and node.js...
Read more >axios vs jQuery | What are the differences?
axios - Promise based HTTP client for the browser and node.js. jQuery - The Write Less, Do More, JavaScript Library..
Read more >5 Best axios Alternative Tools For GET and POST Requests
1. Fetch API · jQuery is relatively easy to use. · jQuery is also incredibly adaptable since it allows users to install plugins....
Read more >Comparing different ways to make HTTP requests in ...
Axios · Uses promises to avoid callback hell · It works on both Browser and Nodejs · Support for upload progress · Can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@raygesualdo Thanks. The
ES6 Promises
is basically the same as the ones in bluebird. Theasync
/await
is so cool.To sum up, use one of the following options:
Promise
async/await
bluebird
.Thank you all.
If you use ES6 Promises, it could be re-written like this:
Or, if you’re using async/await: