wx.request超时
network状态显示:
祭上代码:
wx.request({ url: url, data: new Uint8Array(wx.getFileSystemManager().readFileSync(path)), method: 'PUT' , dataType: 'json' , header: { 'content-type' : '' }, success: (res) => { console.log( 'success' , JSON.stringify(res)); }, fail: (res) => { console.log( 'fail' , JSON.stringify(res)); }, complete: (res) => { console.log( 'complete' , JSON.stringify(res)); } }); |
console打印如下:
fail {“errMsg”:“request:fail timeout”}
complete {“errMsg”:“request:fail timeout”}