Re: [whatwg/streams] Proposal: ReadableStreamBodyReader (Issue #1238)

> As one may imagine implementing `new Response(stream, { headers }).formData()` using this reader

You mean as an engine, or as a user? Because `new Response(stream).json()` etc is already possible.

I think the crux of this proposal is if it makes sense to add another stream reader type, considering one can already do the proposed behaviour with `new Response(stream).json()` etc.

Succinctness alone is not a compelling argument in my opinion, because the new reader mode is more verbose than using `new Response`:

```
> "readable.getReader({ mode: 'body' })".length
36
> "new Response(readable)".length
22
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1238#issuecomment-1175509244
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1238/1175509244@github.com>

Received on Tuesday, 5 July 2022 21:20:59 UTC