提交 948da990 编写于 作者: Q qiang

feat: 安卓端 uni.request 增加参数 sslVerify

上级 fcbae235
...@@ -17,7 +17,8 @@ export function createRequestTaskById (requestTaskId, { ...@@ -17,7 +17,8 @@ export function createRequestTaskById (requestTaskId, {
data, data,
header, header,
method = 'GET', method = 'GET',
responseType responseType,
sslVerify = true
} = {}) { } = {}) {
const stream = requireNativePlugin('stream') const stream = requireNativePlugin('stream')
const headers = {} const headers = {}
...@@ -57,7 +58,9 @@ export function createRequestTaskById (requestTaskId, { ...@@ -57,7 +58,9 @@ export function createRequestTaskById (requestTaskId, {
headers, headers,
type: responseType === 'arraybuffer' ? 'base64' : 'text', type: responseType === 'arraybuffer' ? 'base64' : 'text',
// weex 官方文档未说明实际支持 timeout,单位:ms // weex 官方文档未说明实际支持 timeout,单位:ms
timeout: timeout || 6e5 timeout: timeout || 6e5,
// 配置和weex模块内相反
sslVerify: !sslVerify
} }
if (method !== 'GET') { if (method !== 'GET') {
options.body = data options.body = data
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册