I want to make multiple requests with Axios without waiting it finish one on one.
what i want to do is, even when the first request is waiting, i want the second request is keep proccess and send the return, i dont want to waiting the first request because it will take long time..
async sendLog() {
setTimeout(() => {
if (this.proccessData === true) {
$nuxt.$axios.post('http://localhost/api/log/procreate', {logFile: this.form.logName})
.then((res) => {
this.sendLog();
})
}
}, 1000);
},
async addServer() {
$nuxt.$axios.post('http://localhost/api/servers/create', this.form)
.then((res) => {
this.proccessData = false;
}
}
But this code will run the next request when the current request is finished.