Multiple requests with ajax - Jquery

0

I have a page containing 1 (one) to 50 requests. So I use a loop that makes the call.

For the speed of my internet, in a matter of 3 seconds should load all the requests. But it's done one by one, so it takes minutes to finish.

How do I launch all these requests at once?

Note: The result can be given after the return of each, not the whole.

for(var obj in value){
   $.ajax({
       method:"POST",
       url : "tracker/correios-xml.php",
       data : {cod_correios: e.dados.e_tracking_number, c_retorno : class_add},
       dataType : "json",
       error: function(request, status, erro){

       },
       success: function(e, status, request){

       }
   });
}
    
asked by anonymous 23.12.2017 / 00:00

0 answers