You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ReadableStreams directly, with no prior conversion.
Checklist
I have read the documentation.
The text was updated successfully, but these errors were encountered:
What would you like to discuss?
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 simplefor await..of
loop:got/source/core/index.ts
Lines 969 to 980 in a7b5aec
So, the question is: Why not using the more generic
Iterable
/AsyncIterable
instead ofGenerator
/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.Checklist
The text was updated successfully, but these errors were encountered: