How can i make nested axios call? I need to pass the result of first axios call as parameter to second axios
1 Answer
You can chain just like a normal promise. Fire off the next request in the .then of the first request and then return that promise so you'll have a .then for you second request.
axios.get(...)
.then((response) => {
return axios.get(...); // using response.data
})
.then((response) => {
console.log('Response', response);
});