|
|
@ -68,22 +68,22 @@ http.interceptors.response.use(response => { |
|
|
|
return Promise.reject(error) |
|
|
|
}) |
|
|
|
|
|
|
|
// http.put = function (url, data, config) {
|
|
|
|
// http.post(url, data, {
|
|
|
|
// ...config,
|
|
|
|
// headers: {
|
|
|
|
http.put = function (url, data, config) { |
|
|
|
http.post(url, data, { |
|
|
|
...config, |
|
|
|
headers: { |
|
|
|
"X-HTTP-Method-Override": "PUT", |
|
|
|
}, |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// };
|
|
|
|
// "X-HTTP-Method-Override": "PUT",
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
// };
|
|
|
|
http.delete = function (url, config) { |
|
|
|
http.post(url, config.data || {}, { |
|
|
|
...config, |
|
|
|
headers: { |
|
|
|
"X-HTTP-Method-Override": "DELETE", |
|
|
|
}, |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
// http.delete = function (url, config) {
|
|
|
|
// http.post(url, config.data || {}, {
|
|
|
|
// ...config,
|
|
|
|
// headers: {
|
|
|
|
// "X-HTTP-Method-Override": "DELETE",
|
|
|
|
// },
|
|
|
|
// });
|
|
|
|
export default http |
|
|
|