Reputation: 1010
I'd like to load an entire fetch response in one go, but there doesn't seem to be a readAll
or similar function.
What is the most performant way to read every byte from a ReadableStreamDefaultReader into a single Uint8Array?
Upvotes: 5
Views: 4707
Reputation: 190941
Fetch's Response
interface has .arrayBuffer()
which returns an ArrayBuffer
.
Upvotes: 9