Hello,
Currently, the request body
option can be, among others types, Generator
/ AsyncGenerator
:
https://github.com/sindresorhus/got/blob/a7b5aec57a0245cafbd21696d52cd6bd6c95628a/source/core/options.ts#L1306-1311
These bodies are used like anything implementing the Iterable
/ AsyncIterable
protocol, via a simple for await..of
loop:
Lines 969 to 980 in a7b5aec
So, the question is: Why not using the more generic Iterable
/ AsyncIterable
instead of Generator
/ AsyncGenerator
, as the differences should be very minor? Is there a limitation somewhere, preventing to do that?
Another benefit would be supporting the web ReadableStream
s directly, with no prior conversion.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too