Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
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)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

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 }));
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda