Vue – axios how to chain multiple requests

October 30, 2019

This is how you can chain multiple request when you use the output of the first request to the input of the second request


You need to call the second request when the first request is finsihed

               axios.put('api/products/' + this.$ + '/vendor', {
                    product_id: this.$,
                .then(response => {

                    return axios.get('api/products/' + this.$
                .then(response => {
                    this.product =
                .catch(function (error) {

In this example, first you update the vendor details of the product and then again make a GET request get the updated results