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

Use readable byte stream for Blob.stream() and Response.body #6643

Open
jimmywarting opened this issue Oct 21, 2023 · 0 comments
Open

Use readable byte stream for Blob.stream() and Response.body #6643

jimmywarting opened this issue Oct 21, 2023 · 0 comments
Labels
bug Something isn't working web-api Something that relates to a standard Web API

Comments

@jimmywarting
Copy link

What version of Bun is running?

1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49

What platform is your computer?

Darwin 22.4.0 arm64 arm

What steps can reproduce the bug?

(await fetch('https://example.com')).body.getReader({mode: 'byob'})
new Response('foo').body.getReader({mode: 'byob'})
new Blob(['foo']).stream().getReader({mode: 'byob'})

What is the expected behavior?

should be a byte stream.

What do you see instead?

TypeError: Cannot use a BYOB reader with a non-byte stream

Additional information

Corresponds to whatwg/fetch#1593 and w3c/FileAPI#188.

@jimmywarting jimmywarting added the bug Something isn't working label Oct 21, 2023
@jimmywarting jimmywarting changed the title Use readable byte stream for Blob.stream() and Response.body #17386 Use readable byte stream for Blob.stream() and Response.body Oct 21, 2023
@Electroid Electroid added the web-api Something that relates to a standard Web API label Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web-api Something that relates to a standard Web API
Projects
None yet
Development

No branches or pull requests

2 participants