提交 e407364b 编写于 作者: Q qiang

feat: H5 uni.request 支持 withCredentials 参数配置

上级 ea551cdf
......@@ -100,5 +100,8 @@ export const request = {
value = (value || '').toLowerCase()
params.responseType = Object.values(responseType).indexOf(value) < 0 ? responseType.TEXT : value
}
},
withCredentials: {
type: Boolean
}
}
}
......@@ -45,7 +45,8 @@ export function request ({
header,
method,
dataType,
responseType
responseType,
withCredentials
}, callbackId) {
const {
invokeCallbackHandler: invoke
......@@ -143,6 +144,7 @@ export function request ({
errMsg: 'request:fail'
})
}
xhr.withCredentials = withCredentials
xhr.send(body)
return requestTask
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册