Baseline 2025
Newly available
Note: This feature is available in Web Workers.
The bytes()
method of the Request
interface reads the request body and returns it as a promise that resolves with an Uint8Array
.
None.
Return valueA promise that resolves with an Uint8Array
.
const myArray = new Uint8Array(10);
const request = new Request("/myEndpoint", {
method: "POST",
body: myArray,
});
request.bytes().then((buffer) => {
// do something with the buffer sent in the request
});
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4