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

117
Views
¿Cómo obtener respuestas ajax de rápidas a lentas?
  1. las solicitudes se envían simultáneamente
  2. no es necesario esperar a que se resuelvan todas las respuestas

ejemplo: hay 3 solicitudes que se envían simultáneamente

axios.get(url1) necesita 1s para obtener respuesta axios.get(url2) necesita 2s para obtener respuesta axios.get(url3) necesita 3s para obtener respuesta ¿cómo obtener respuestas como res1 luego res2 luego res3? promise.all y promise.race no pueden hacer esto (porque todos esperarán que la respuesta más baja no regrese de la más rápida a la más lenta, y la carrera devolverá la más rápida, no todos)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Si todas las URL están en una matriz, simplemente puede recorrer la matriz y llamar a axios.get() en cada una.

 urls.forEach(url => axios.get(url).then(response => { process the response }));
over 4 years ago · Santiago Trujillo 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!