参考文档:https://github.com/axios/axios
https://www.kancloud.cn/yunye/axios/234845
1,框架中使用







2,浏览器直接引用
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
axios.defaults.baseURL = 'http://test/api/v0.1/activity'; //
axios.defaults.headers.common['X-Token'] ='12142424234234';
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
网友评论