Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

133
Views
How to get ajax responses from fast to slow?
  1. requests send simultaneously
  2. don't need to wait all response resolved

example: there are 3 request sending simultaneously

axios.get(url1) needs 1s to get response axios.get(url2) needs 2s to get response axios.get(url3) needs 3s to get response how to get responses like res1 then res2 then res3 ? promise.all and promise.race can not do this(because all will wait the lowest response not return from fastest to slowest, and race will return the fastest not all)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If all the URLs are in an array, you can simply loop over the array, calling axios.get() on each one.

urls.forEach(url => axios.get(url).then(response => { process the response }));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!