Re: [whatwg/fetch] Editorial: Amend body reading to use no-promise version (PR #1569)

@domenic approved this pull request.

LGTM with nits

> @@ -6958,8 +6945,25 @@ the associated steps:
  <li><p>Let <var>promise</var> be <a>a promise resolved with</a> an empty
  <a for=/>byte sequence</a>.
 
- <li><p>If <var>object</var>'s <a for=Body>body</a> is non-null, then set <var>promise</var> to the
- result of <a>fully reading body as promise</a> given <var>object</var>'s <a for=Body>body</a>.
+ <li>
+  <p>If <var>object</var>'s <a for=Body>body</a> is non-null, then:
+
+  <ol>
+   <li><p>Set <var>promise</var> to <a>a new promise</a>.
+
+   <li><p>Let <var>successStep</var> given a <a>byte sequence</a> <var>bytes</var> be to

```suggestion
   <li><p>Let <var>successSteps</var> given a <a>byte sequence</a> <var>bytes</var> be to
```

> +
+  <ol>
+   <li><p>Set <var>promise</var> to <a>a new promise</a>.
+
+   <li><p>Let <var>successStep</var> given a <a>byte sequence</a> <var>bytes</var> be to
+   <a for=/>resolve</a> <var>promise</var> given <var>bytes</var>.
+
+   <li><p>Let <var>errorSteps</var> given <var>error</var> be to <a>reject</a> <var>promise</var>
+   given <var>error</var>.
+
+   <li><p>Let <var>reader</var> be the result of <a for=ReadableStream>getting a reader</a> for
+   <var>body</var>'s <a for=body>stream</a>. If that threw an exception, then run
+   <var>errorSteps</var> with that exception.
+
+   <li><p><a for=ReadableStreamDefaultReader>Read all bytes</a> from <var>reader</var>, given
+   <var>successStep</var> and <var>errorSteps</var>.

```suggestion
   <var>successSteps</var> and <var>errorSteps</var>.
```

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

Message ID: <whatwg/fetch/pull/1569/review/1216756668@github.com>

Received on Wednesday, 14 December 2022 04:08:23 UTC