const requestTask = wx.request({
url: 'www.baidu.com',
header: {
'content-type': 'application/json' // 默认值
},
success (res) {
console.log(res.data)
}
});
const listener = function (res) {
console.log('onChunkReceived')
}
requestTask.onChunkReceived(listener);
以上代码运行时提示:TypeError: Cannot read property 'onChunkReceived' of undefined
使用的库为Wechat Lib:2.28.0
请问该如何才能使用?