Hello,
I am processing a csv file to import each rows in a Database.
For each row, I've got to ask Google Maps API to get its latitude and longitude coordinates so I can take some milliseconds for each row.
To give some feedback to the user, I choose to add each row with an AJAX POST request to the server API in order to check the validity for each row and give some progression feedbacks.
My problem is that AJAX means asynchroneous and every request is sent at the same time without waiting for the answer.
When more than 5 request are sent in the same time, the server returns 500 HTTP Error.
How is it possible for me to delay each request in order to wait until the previous one is returning before to send the next one ?
I am using JQuery ajax $.post()
function to send each request.
Thanks for your help