Re: [whatwg/fetch] Call `finalize and report timing` automatically on end-of-body (PR #1413)

@noamr commented on this pull request.



> -<var>processEarlyHintsResponse</var> must be an algorithm accepting a <a for=/>response</a>. If
-given, <var>processResponse</var> must be an algorithm accepting a <a for=/>response</a>. If given,
-<var>processResponseEndOfBody</var> must be an algorithm accepting a <a for=/>response</a>. If
-given, <var>processResponseConsumeBody</var> must be an algorithm accepting a <a for=/>response</a>
-and null, failure, or a <a for=/>byte sequence</a>.
+an optional boolean <dfn export for=fetch><var>useParallelQueue</var></dfn> (default false), an
+optional null or string <dfn export for=fetch><var>initiatorType</var></dfn> (default null),
+and an optional "<code>client</code>" or a <a for=/>global object</a>
+<dfn export for=fetch><var>timingGlobal</var></dfn> (default "<code>client</code>"), run the steps
+below. If given, <var>processRequestBodyChunkLength</var> must be an algorithm accepting an integer
+representing the number of bytes transmitted. If given, <var>processRequestEndOfBody</var> must be an
+algorithm accepting no arguments. If given, <var>processEarlyHintsResponse</var> must be an
+algorithm accepting a <a for=/>response</a>. If given, <var>processResponse</var> must be an
+algorithm accepting a <a for=/>response</a>. If given, <var>processResponseEndOfBody</var> must be
+an algorithm accepting a <a for=/>response</a>. If given, <var>processResponseConsumeBody</var> must
+be an algorithm accepting a <a for=/>response</a> and null, failure, or a <a for=/>byte sequence</a>.

When the SW forwards a fetch (e.g. `fetch(event.request)`), it's a new fetch with its own initiator type and timing global - otherwise they would be forwarded and reporting would be wrong. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1413#discussion_r891437062
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1413/review/998455415@github.com>

Received on Tuesday, 7 June 2022 16:17:07 UTC