Does Axios have a way to queue X simultaneous requests?
See original GitHub issueLet’s say I need to do 20 ajax requests, and my server supports doing 3 at a time.
Does Axios have a way to queue up the 20 requests, and run 3 concurrently?
It doesn’t seem like .all()
or .spread()
support this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Using axios.all to make concurrent requests - LogRocket Blog
axios.all is a helper method built into Axios to deal with concurrent requests. Instead of making multiple HTTP requests individually, ...
Read more >How to send multiple requests using axios - Storyblok
Let us start with a small task and sending one request using Axios itself. First, we import axios and define the API/URL we...
Read more >Handle Multiple Requests Using Axios Interceptor While ...
Whenever login API expires authentication token so we simply refresh it through Interceptor(request and response).
Read more >Axios multiple request on interceptor - Stack Overflow
My question is let say I have three requests happening concurrently and I don't have the token, the interceptor calling the getUserRandomToken ...
Read more >How to Perform HTTP Requests with Axios – A Complete Guide
Fetch API and Axios are the two most common native Javascript alternatives for sending multiple requests right now. However, Axios GitHub has an ......
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
I was able to achieve this using another helper library cwait (in combination with axios):
You can use
Bluebird.map
to control the concurrency of any Promise-based code. See http://bluebirdjs.com/docs/api/promise.map.htmlThis is out of the scope of Axios.