Ok So I am trying to send POST requests with axios, but I want to add some delay in between POSTS.
let list =['item1', 'item2', 'item3', 'item4'];
function add_item(list,item){
axios.post(`api.example.com/api/2/list${list}/items/create.json?access_token=${config.token}`,{
list:item
})
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.log(error);
});
}
for(let i of list){
add_item(config.list, i)