美文网首页
react.js项目小结 axios用法

react.js项目小结 axios用法

作者: seven_2547 | 来源:发表于2018-04-23 14:21 被阅读0次

参考文档: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';

相关文章

网友评论

      本文标题:react.js项目小结 axios用法

      本文链接:https://www.haomeiwen.com/subject/agmoxftx.html