skywalking
skywalking copied to clipboard
Skywalking-client-js cannot fetch a stream from the fetch API
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [ ] Question or discussion
- [x] Bug
- [ ] Requirement
- [ ] Feature or performance improvement
Bug
-
Which company or project? pdf.js
-
What happened? whatwg-fetch doesn't implement stream api https://github.com/github/fetch/issues/746 An error occurs when you try to get a ReadableStream. pdf.js use
res.bodyget a stream.
// Fetch the original image
fetch('./tortoise.png')
// Retrieve its body as ReadableStream
.then(response => response.body)
.then(body => {
const reader = body.getReader();
});

jsfiddle example (First of all, the cross-domain problem should be solved before it can be reproduced)
@Fine0830
Close this via https://github.com/apache/skywalking-client-js/pull/48