基础面试题
开源分享:【大厂前端面试题解析+核心总结学习笔记+真实项目实战+最新讲解视频】
主要内容包括: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