Currently I am using Promise.all() to send multiple axios requests all at once, but I want to send the requests one by one, meaning send the second request after the first one completes.
This is important so far as they timestamp of the POST request is important. The POST request for the promise in the 0th element of the array needs to have a earlier timestamp than the promise at the 1st element and so forth.
Here is the code I have written so far.
Promise.all(
rowNodes.map((row) => {
axios.post(url, row, axiosOptions);
})
)
.then((responseArr) => {
console.log(responseArr);
})
.catch((errorArr) => {
console.log(errorArr);
});