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

Implement Request/Response .bytes() method #23790

Closed
bakkot opened this issue May 13, 2024 · 0 comments · Fixed by #23823
Closed

Implement Request/Response .bytes() method #23790

bakkot opened this issue May 13, 2024 · 0 comments · Fixed by #23823
Assignees
Labels
enhancement web related to Web APIs

Comments

@bakkot
Copy link

bakkot commented May 13, 2024

See whatwg/fetch#1732.

Tests at web-platform-tests/wpt#46198.

The above spec PR adds a bytes() method to get a Uint8Array to Body, instead of requiring users to get an ArrayBuffer with arrayBuffer() and then wrap it.

There are also PRs to do the same for Blob and PushMessageData, which copy relevant parts of the Body interface:

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

Successfully merging a pull request may close this issue.

3 participants