Re: [whatwg/fetch] Editorial: Add prose about constructing a request (PR #1585)

@npm1 commented on this pull request.



> @@ -8380,6 +8380,56 @@ correctly. This section aims to give some advice.
 
 <p class=XXX>This is a work in progress.
 
+<h3 id=fetch-elsewhere-request>Constructing a request</h3>
+
+<p>The first step in <a for=/>fetching</a> is to create a <a for=/>request</a>, and populate its
+multiple associated parameters.
+
+<p>A <a for=/>request</a> oftenmost has a <a for=request>client</a>, which is the
+<a>environment settings object</a> that initiatated the request, and the receiver of the different

nit: initiated (typo)

> @@ -8380,6 +8380,56 @@ correctly. This section aims to give some advice.
 
 <p class=XXX>This is a work in progress.
 
+<h3 id=fetch-elsewhere-request>Constructing a request</h3>

Agree that it would be good to format this more as a how-to, and in particular have more bullet lists (and mandatory parameters first and common optional parameters after). A hard part about using fetch is how to invoke it and continue processing the response after it's done. Based on the title of the section it would be out of scope but wanted to point out the gap there as well. There are not many good examples of using fetch in a nontrivial way where the result is 'awaited' by the algorithm, which then does something with the response.

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

Message ID: <whatwg/fetch/pull/1585/review/1235214472@github.com>

Received on Tuesday, 3 January 2023 23:36:53 UTC