- From: Yutaka Hirano <notifications@github.com>
- Date: Fri, 18 Sep 2015 00:26:06 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
Received on Friday, 18 September 2015 07:26:37 UTC
> What is the reason for not introducing Request.prototype.body? Hmm, I made that decision ago, and at that time it looked difficult to reading body stream bytes when fetching. I reconsidered it and it might be possible by changing the fech() function as following. from: - Fetch _request_ to: - Let _reader_ be the result of getting a reader from _request_.body. If that throws an exception, reject _p_ with that exception and abort these steps. - Let _promise_ be the result of reading all data from _request_.body with _reader_. - When _promise_ is fulfilled with _bytes_, set _request_'s body to _bytes_ and Fetch _request_. - When _promise_ is rejected with an error, reject _p_ with that error. What do you think about it? --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/128#issuecomment-141369310
Received on Friday, 18 September 2015 07:26:37 UTC