Ajax
http通讯代理和管理器
API
setAjaxConfig(setting)
// 参数配置
let AjaxBaseConfig = {
// 请求头,根据需要设置,默认如下
headers: { 'X-Requested-With': 'XMLHttpRequest' },
// 超时时间,花费时间超过timeout,请求将被中断
timeout: 30000,
// 编码格式
responseEncoding: 'utf8',
// 是否使用web请求(axios)
isWeb: true,
// 默认地址
baseURL: undefined,
};get(url,urlKey)
post(url,data)
requestBuilder
Last updated
Was this helpful?