Re: [whatwg/fetch] Using fetch in other standards (#1314)

@tabatkins approved this pull request.

A good starting point! We'll eventually want usage examples, but this description of inputs and rough meaning/usage is already enormously helpful.

> +
+<p class=warning>Always ask domain experts for review.
+
+<p class=XXX>This is a work in progress.
+
+
+<h3 id=fetch-elsewhere-fetch class=no-num>Invoking fetch</h3>
+
+<p>Aside from a <a for=/>request</a> the <a for=/>fetch</a> operation takes several optional
+arguments. For those arguments that take an algorithm: the algorithm will be called from a task (or
+in a <a for=/>parallel queue</a> if <a for=fetch><i>useParallelQueue</i></a> is true).
+
+<dl>
+ <dt><a for=fetch><i>processRequestBody</i></a>
+ <dd><p>Takes an algorithm that will be passed the number of bytes that have been transmitted from
+ the <a for=/>request</a>'s <a for=request>body</a>. Most standards will not need this.

Is this algo potentially called repeatedly during sending of the rquest, or just once?

> +<p>Aside from a <a for=/>request</a> the <a for=/>fetch</a> operation takes several optional
+arguments. For those arguments that take an algorithm: the algorithm will be called from a task (or
+in a <a for=/>parallel queue</a> if <a for=fetch><i>useParallelQueue</i></a> is true).
+
+<dl>
+ <dt><a for=fetch><i>processRequestBody</i></a>
+ <dd><p>Takes an algorithm that will be passed the number of bytes that have been transmitted from
+ the <a for=/>request</a>'s <a for=request>body</a>. Most standards will not need this.
+
+ <dt><a for=fetch><i>processRequestEndOfBody</i></a>
+ <dd><p>Takes an algorithm that will be passed nothing. Indicates <a for=/>request</a>'s
+ <a for=request>body</a> has been transmitted. Most standards will not need this.
+
+ <dt><a for=fetch><i>processResponse</i></a>
+ <dd><p>Takes an algorithm that will be passed a <a for=/>response</a>. Indicates
+ <a for=/>response</a>'s <a for=response>header list</a> has been transmitted and initialized. This

s/transmitted/received/, since this is from the POV of the browser?

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

Received on Monday, 4 October 2021 16:27:51 UTC