- From: Khafra <notifications@github.com>
- Date: Sat, 17 Sep 2022 17:36:58 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Sunday, 18 September 2022 00:37:10 UTC
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