-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce FetchReadableByteStream to support bodyUsed. #43
Conversation
This is an option discussed in #37. Note that the discussion is not finished and this branch is created to see how the wrapper option looks actually. |
FetchReadableByteStream has |
In terms of making this more rigorous, I am not sure how to do so without modifying the base streams spec (and implementation). Specs call AcquireReadableStreamReader(input) to get a reader---they don't go through the public API. So the only things I can think of that would work are:
Also, maybe I am having a hard time reading the spec, but how does this handle |
We can define FetchReadbableByteStream using composition.
Yes. I think in any case we need wrapper to say something like "body property is of type [Fetch]ReadableByteStream". Otherwise, Request.body and Response.body will be of any type. |
I guess that is true. It means that people cannot modify ReadableByteStream.prototype to add extra methods but we have already moved away from that model with separate ReadableByteStream and ReadableStream. Maybe this is not so bad. |
I guess this can be closed now we decided to just go with |
Yes, thanks. |
No description provided.