[whatwg/fetch] Behavior when consuming a body with for await (Issue #1488)

In node and deno, due to ReadableStream's async iterator, the following is possible to consume the body more than once without throwing an error:

```js
const response = await fetch('https://example.com')

for await (const chunk of response.body) {}
for await (const chunk of response.body) {}
```

In the second loop, the iterator ends instantly as expected, but this behavior seems strange in regards to the other ways of consuming a body.

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

Message ID: <whatwg/fetch/issues/1488@github.com>

Received on Sunday, 18 September 2022 00:37:10 UTC