为什么axios请求接口会发起两次请求
2 回答

翻翻过去那场雪
TA贡献2065条经验 获得超14个赞
config配置文件中有两个参数
// onUploadProgress: function(progressEvent) {
// // Do whatever you want with the native progress event
// },
// onDownloadProgress: function(progressEvent) {
// // Do whatever you want with the native progress event
// },
分别处理上传和下载事件,也就是这里绑定了upload事件,所以每次请求都会有个option请求。

郎朗坤
TA贡献1921条经验 获得超9个赞
1. 设定一个密钥比如key = ‘2323dsfadfewrasa3434'。 2. 这个key 只有发送方和接收方知道。 3. 调用时,发送方,组合各个参数用密钥 key按照一定的规则(各种排序,MD5,ip等)生成一个access_key。一起post提交到API接口。
- 2 回答
- 0 关注
- 2156 浏览
添加回答
举报
0/150
提交
取消