- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 18 Oct 2016 12:29:42 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Tuesday, 18 October 2016 19:30:17 UTC
The problem essentially is that `Request`s, as specified in Fetch, are timeless objects that can be carted around and used. They aren't tied to a specific actual fetch() call (i.e. a specific actual request). This means that associating a writable stream with each Request gets strange, as you have to then hook up the writable stream to a specific "actual writable stream" when the fetch() happens. The design we settled on was instead that you could have a `Request` with a body that is a readable stream, which gets carted around along with the timeless `Request` object. Then, `fetch()` takes care of doing an invisible `request.body.pipeTo(writableStreamRepresentingThisFetch)` behind the scenes, once we've figured out what that `writableStreamRepresentingThisFetch` is. But `writableStreamRepresentingThisFetch` is never exposed to the user, by the nature of the timeless-Request model. -- 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/378#issuecomment-254613664
Received on Tuesday, 18 October 2016 19:30:17 UTC