Skip to content

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

@jimmywarting

Description

@jimmywarting

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingweb-apiSomething that relates to a standard Web API

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions