Re: [whatwg/fetch] idea: Accept a iterator as a body (#809)

I feel like this proposal could definitely improve interoperability between the two most popular stream implementations at the moment: Node.js streams and WHATWG streams. Arguably, we could probably use iterators though as the foundation — pass in a stream and internally the logic is to actually call `Symbol.iterator` to consume that stream. This would mean that the implementation code wouldn't have to care if the input is a Node.js Stream or WHATWG Stream.

@jimmywarting shouldn't it be `Symbol.stream` (akin to `Symbol.iterator` where it's `.iterator` not `.toIterator`)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/809#issuecomment-513470207

Received on Saturday, 20 July 2019 14:04:16 UTC