Re: [whatwg/fetch] Editorial: consistently use a body + type tuple (PR #1439)

@annevk commented on this pull request.

Thanks for working on this! This needs a PR for XHR too, right?

> @@ -1297,6 +1297,14 @@ null), run these steps. <var>processBody</var> must be an algorithm accepting a
 
 <hr>
 
+<p>A <dfn export>body with type</dfn> is a <a for=/>tuple</a> that consists of a
+<dfn export for="body with type">body</dfn> (a <a for=/>body</a>) and a
+<dfn export for="body with type">type</dfn> (a <a for=/>header value</a>).
+
+<p class="note no-backref">Be aware that a <a for=/>body with type</a>'s <a for="body with type">type</a> can be null.

In that case it should say "null or a header value" above.

> @@ -3881,8 +3889,8 @@ the request.
  <var>crossOriginIsolatedCapability</var>.
 
  <li><p>If <var>request</var>'s <a for=request>body</a> is a <a for=/>byte sequence</a>, then set
- <var>request</var>'s <a for=request>body</a> to the first return value of
- <a for=BodyInit>safely extracting</a> <var>request</var>'s <a for=request>body</a>.
+ <var>request</var>'s <a for=request>body</a> to the <a for="body with type">body</a> in the result

I think it should be "of the result" (applies several times), but not a 100%.

> @@ -6451,9 +6461,8 @@ typedef (Blob or BufferSource or FormData or URLSearchParams or USVString) XMLHt
 
 typedef (ReadableStream or XMLHttpRequestBodyInit) BodyInit;</pre>
 
-<p>To <dfn for=BodyInit export>safely extract</dfn> a <a for=/>body</a> and a
-`<code>Content-Type</code>` <a for=/>header value</a> from a <a for=/>byte sequence</a> or
-{{BodyInit}} object <var>object</var>, run these steps:
+<p>To <dfn for=BodyInit export>safely extract</dfn> a <a for=/>body with type</a> from a
+<a for=/>byte sequence</a> or {{BodyInit}} object <var>object</var>, run these steps:

In this algorithm you want to change "results" to "result" as it now returns a singular thing.

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

Message ID: <whatwg/fetch/pull/1439/review/969176524@github.com>

Received on Wednesday, 11 May 2022 11:52:25 UTC