Closed MartinMuzatko closed 6 years ago
Have gander at request interceptors. **using Axios as a provider.
// Add a request interceptor
vue.$http.interceptors.request.use((config) => {
// do extra stuff here
return config;
}, (error) => {
return Promise.reject(error.response);
});
// Add a response interceptor
vue.$http.interceptors.response.use((response) => {
// do extra stuff here
return response;
}, (error) => {
return Promise.reject(error.response);
});
Closing issue as this is not really an issue and inactivity.
hey there! For me, setting URL and formdata name for the image is not enough. I want to send additional formdata, POST and PUT requests and add my own headers.
Is there a way to hoop into the request before it is sent? Thanks!