[英]Read all bytes from a ReadableStream
I'd like to load an entire fetch response in one go, but there doesn't seem to be a readAll
or similar function.我想一次性加载整个获取响应,但似乎没有readAll
或类似功能。
What is the most performant way to read every byte from a ReadableStreamDefaultReader into a single Uint8Array ?将ReadableStreamDefaultReader中的每个字节读取到单个Uint8Array中的最有效方法是什么?
Fetch's Response
interface has .arrayBuffer()
which returns an ArrayBuffer
. Fetch 的Response
接口有.arrayBuffer()
返回一个ArrayBuffer
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.