- From: Tushar Mathur <notifications@github.com>
- Date: Fri, 15 Jan 2016 04:10:54 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Message-ID: <whatwg/fetch/issues/196/171945465@github.com>
@annevk Well I can work with this approach as well and I agree with what @tyoshino has explained above. The API wasn't intuitive to me at the same time very difficult for me to explain why. Let me still try to give it a shot — Intuitively all this time we have been used to thinking that if we have access to the response, we will have access to the body also. And suddenly here I can only access the body once! Which is fine and I might be able to get used to it, but there is a better way I think. I would have preferred if the body was exposed as a hot observable. I would have been able to reduce the stream to a real JSON, then eventually convert it to a promise (or not). The advantage of this approach is that I know for a fact that the response body stream will not be available to me for later use as its a Hot Observable. I can do everything with the current set of APIs also, but this just seems more intuitive to me. Thoughts? --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/196#issuecomment-171945465
Received on Friday, 15 January 2016 12:11:23 UTC