We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
H5
https://github.com/vdfor/taro-issues-demo/tree/master/h5-fetch-polyfill 浏览器版本: HTC Browser 6 使用框架: React
直接通过最小话仓库运行 yarn run dev:h5 , 查看控制台。
yarn run dev:h5
或者
async componentDidMount () { try { await request({ url: 'https://cnodejs.org/api/v1/topic/5433d5e4e737cbe96dcef312' }) } catch (error) { console.error('error => ', error) } }
不支持fetch的浏览器也可以使用通过polyfill来使用request
不支持fetch的浏览器无法使用request
Taro CLI 3.0.5 environment info: System: OS: Windows 10 Binaries: Node: 12.18.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Users\vdfor\AppData\Roaming\npm\yarn.CMD npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
在 taro-h5/src/api/request/index.js (80行) 的 response.headers —— 在支持fetch的浏览器其为Map对象,在不支持fetch的浏览器上,通过unfetch/polyfill兼容,其值为普通对象,不可使用 forEach 进行遍历。
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
相关平台
H5
复现仓库
https://github.com/vdfor/taro-issues-demo/tree/master/h5-fetch-polyfill
浏览器版本: HTC Browser 6
使用框架: React
复现步骤
直接通过最小话仓库运行
yarn run dev:h5
, 查看控制台。或者
期望结果
不支持fetch的浏览器也可以使用通过polyfill来使用request
实际结果
不支持fetch的浏览器无法使用request
环境信息
补充信息
在 taro-h5/src/api/request/index.js (80行) 的 response.headers —— 在支持fetch的浏览器其为Map对象,在不支持fetch的浏览器上,通过unfetch/polyfill兼容,其值为普通对象,不可使用 forEach 进行遍历。
The text was updated successfully, but these errors were encountered: