2024年最新Vue进阶(三):Axios 应用详解_vue axios,携程 前端面试

基础面试题

开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】

主要内容包括:HTML,CSS,JavaScript,浏览器,性能优化等等

return data;
}],

// headers are custom headers to be sent
headers: {‘X-Requested-With’: ‘XMLHttpRequest’},

// params are the URL parameters to be sent with the request
params: {
ID: 12345
},

// paramsSerializer is an optional function in charge of serializing params
// (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)
paramsSerializer: function(params) {
return Qs.stringify(params, {arrayFormat: ‘brackets’})
},

// data is the data to be sent as the request body
// Only applicable for request methods ‘PUT’, ‘POST’, and ‘PATCH’
// When no transformRequest is set, must be a string, an ArrayBuffer or a hash
data: {
firstName: ‘Fred’
},

// timeout specifies the number of milliseconds before the request times out.
// If the request takes longer than timeout, the request will be aborted.
timeout: 1000,

// withCredentials indicates whether or not cross-site Access-Control requests
// should be made using credentials
withCredentials: false, // default

// adapter allows custom handling of requests which makes testing easier.
// Call resolve or reject and supply a valid response (see respo

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值