Skip to content
New issue

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

fetch请求方式报错 #5

Open
chenchenyuyu opened this issue May 7, 2019 · 1 comment
Open

fetch请求方式报错 #5

chenchenyuyu opened this issue May 7, 2019 · 1 comment

Comments

@chenchenyuyu
Copy link

Uncaught (in promise) TypeError: Failed to execute 'json' on 'Response': body stream is locked

@kissshot
Copy link

我也碰到这个问题了, fetch的res只能调用一次text或者json之类的方法, sdk这里调了一次res.text(), res.body就被lock了。。。 希望作者能解决一下
return _fetch.apply(this, arguments) .then((res) => { if (result.type === 'report-data') return; getFetchTime('success') try { const url = res.url ? res.url.split('?')[0] : ''; res.text().then(data => { if (conf.ajaxMsg[url]) conf.ajaxMsg[url]['decodedBodySize'] = data.length; }) } catch (e) { } return res })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants