Browse Source

退回

master
dai 3 years ago
parent
commit
c075e7f3e7
  1. 32
      epmet-oper-web/src/utils/request.js

32
epmet-oper-web/src/utils/request.js

@ -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

Loading…
Cancel
Save