- From: Luke Warlow <notifications@github.com>
- Date: Fri, 25 Jul 2025 05:50:14 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1843/review/3055283532@github.com>
@lukewarlow commented on this pull request. > - <p><p>Set <var>controller</var> to the result of calling <a for=/>fetch</a> given - <var>request</var> and <a for=fetch><i>processResponse</i></a> given <var>response</var> being - these steps: + <p>Let <var>processRequestEndOfBody</var> be these steps: + + <ol> + <li><p>If <var>hasUploadListeners</var> is false, then return. + + <li><p>Increase <var>requestBodyTransmitted</var> by <var>bytesLength</var>. + + <li><p><a>Fire a progress event</a> named <a event><code>progress</code></a> at <var>requestObserver</var> + with <var>requestBodyTransmitted</var> and <var>requestBodyLength</var>. + </ol> + + <li> + <p>Let <var>processResponse</var> given a <var>response</var> be these steps: If we want to do progress tracking for response we'll need to do it differently to XHR, XHR consumes the body inside of this algorithm but fetch obviously can't. One idea is to wrap response's body with a wrapper readable stream that allows use to fire progress events when the body actually gets read. This way we don't consume anything to report progress, (we can make it so we only wrapper if there's a responseObserver with a progress event listeners). -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/pull/1843#pullrequestreview-3055283532 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/pull/1843/review/3055283532@github.com>
Received on Friday, 25 July 2025 12:50:19 UTC