- From: Henry Story <notifications@github.com>
- Date: Wed, 02 Dec 2015 07:57:05 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/167@github.com>
I have been wondering what the type of the stream returned by I am using the Fetch API's [fetch method](https://fetch.spec.whatwg.org/#fetch-method) which [returns a Promise of a Response](https://fetch.spec.whatwg.org/#response), which contains a `body` which is a `ReadableStream`. From this I can then get chunks for my parser. Since the streams do not specify the type of a chunk ( see [issue 410 of streams api](https://github.com/whatwg/streams/issues/410) ) it would be helpful if the documentation in the Fetch API made clear what type of stream was returned. Now it is true that the [Response.body](https://fetch.spec.whatwg.org/#concept-body) method says: > A `body` is a byte stream. It has an associated transmitted which is an integer and initially 0, length which is an integer and initially 0, and error flag which is initially unset. So I suppose that means the content of the chunk contains bytes, but it is not clear that this means that all chunks will be `Uint8Array`s --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/167
Received on Wednesday, 2 December 2015 15:57:37 UTC