What's the best way to retry failed AJAX request in VueJS ?
bulkDecline(requests, decliner) {
requests = _.map(requests, 'id');
return Vue.http.post(`${baseUrl}/api/decline/${decliner}/bulk-decline`, requests)
.then(
(response) => {
Notification({
title: 'Success!',
message: response.data.message,
type: 'success'
});
return response;
},
(response) => {
this.bulkDecline(requests, decliner);
}
);
}
But it seems like its not working.