mirror of
https://github.com/zuiidea/antd-admin.git
synced 2024-04-21 12:32:14 +00:00
461 B
461 B
HTTP request
this project use axios for http service, file located in src/utils/request.js
Custom Header
As for privilege access or modify cookie, you could add header param by yourself
axios.defaults.headers.common['Authorization'] = 'token'
Or
axios.interceptors.request.use(function (config) {
config.headers.token = window.localStorage.getItem('token');
return config;
}, function (error) {
return Promise.reject(error);
});