Re: [fetch] Proposed backward-incompatible change: requiring cloning all requests/responses (#61)

> Will calling .text() etc update .body.bytesRead? Could I use it to create a progress meter (assuming Content-Length is correct)?

The design has evolved a bit. Remember that .text() in specific, and anything that reads from the stream in general, is going to use an exclusive reader. The whole point of the exclusive reader is to prevent others from viewing what's going on with the stream, since that would preclude optimizations like off-main-thread work (e.g. consider .json() doing off-main-thread JSON parsing). So, not really. You have to be the one reading to get progress, as always. Anything else means that we have to do synchronization back to the main thread and all that fun stuff.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/61#issuecomment-117161112

Received on Tuesday, 30 June 2015 12:36:22 UTC