Implement Request/Response `.bytes()` method
Categories
(Core :: DOM: Networking, enhancement, P2)
Tracking
()
People
(Reporter: bakkot, Assigned: evilpies)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [necko-triaged][necko-priority-next], [wptsync upstream])
Attachments
(2 files)
Steps to reproduce:
See https://github.com/whatwg/fetch/issues/1732.
Tests at https://github.com/web-platform-tests/wpt/pull/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:
Updated•8 months ago
|
Sounds interesting, I will have a look.
Updated•8 months ago
|
Updated•8 months ago
|
Comment 5•8 months ago
|
||
Backed out for causing assertions on Interpreter.cpp.
Comment 7•8 months ago
|
||
Also these mochitest plain test failures: https://treeherder.mozilla.org/logviewer?job_id=459245382&repo=autoland&lineNumber=2773
Comment 10•8 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/66113edf97b9
https://hg.mozilla.org/mozilla-central/rev/05cad689932f
Assignee | ||
Comment 14•7 months ago
•
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: New convenience function on many objects
[Affects Firefox for Android]: yes
[Suggested wording]: A new methods bytes() is provided on many objects like Request/Response and Blob that provides a convenient way of getting an Uint8Array typed array.
[Links (documentation, blog post, etc)]: Not yet really? https://github.com/w3ctag/design-principles/issues/463
Comment 16•7 months ago
|
||
FF128 MDN docs for this covered in https://github.com/mdn/content/issues/33984
Description
•