![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
promise
小肥喵大人
这个作者很懒,什么都没留下…
展开
-
fetch+promise
fetch+promise我知道的是针对一个请求的,且返回promise对象,then中以resolve接收response,下面先简单介绍下组合使用场景一、结合超时处理//基本配置参数let defaultOption = { timeout: 5000, method: 'post', data: null,原创 2017-08-31 17:37:26 · 736 阅读 · 0 评论 -
axios下载excel文件
html下载文件最简单的方式莫过于使用a标签赋予href下载,或者是window.open,但是却无法执行post请求、以及在request.headers中放置内容,以下提供一种方式,基于axiosimport axios from 'axios'axios.interceptors.response.use( response => { if(re...原创 2018-04-17 21:41:12 · 15581 阅读 · 2 评论