-
Notifications
You must be signed in to change notification settings - Fork 336
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 RequestInit.duplex #1457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a Request#duplex attribute too, otherwise the new Response(resp.body, resp);
pattern breaks.
Co-authored-by: Luca Casonato <hello@lcas.dev>
I don't understand, this change is solely for requests, not responses. |
Sorry, I meant |
Thinking about that more, the pattern is currently unusable in runtimes that don't support stream request bodies. That means this would be a Deno specific issue (which will be addressed by us defaulting Exposing |
As you see in the change, currently Does this make sense? |
Yeah, that is my understanding too.
I don't quite understand. Are you saying to not introduce the |
Right, because I don't see a reason to specify it now, and I see a reason not to specify it now. Specifically,
This is different from the situation for
|
You can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that makes sense to me.
LGTM
This is for whatwg/fetch#1457.
Thank you! @annevk , can you take a look at this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to me, but we can simplify it a bit further.
I like that we have a note about specifying "full" though. Let's keep that.
I'll merge this on Friday unless anything new comes up. (I assume we'll have the tests sorted by then and @lucacasonato will have had a chance to look at those as well.) |
See whatwg/fetch#1457 for context.
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740889 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020764}
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740889 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020764}
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740889 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020764}
…only Automatic update from web-platform-tests Fetch: tests for RequestInit's duplex See whatwg/fetch#1457 for context. -- wpt-commits: a9b73f530b73d237b0512968715104c96631c22a wpt-pr: 34496
…only Automatic update from web-platform-tests Fetch: tests for RequestInit's duplex See whatwg/fetch#1457 for context. -- wpt-commits: a9b73f530b73d237b0512968715104c96631c22a wpt-pr: 34496
Automatic update from web-platform-tests Introduce RequestInit.duplex This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740889 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020764} -- wpt-commits: 341bf2487ba47b9810a4dfa97752ffe57fa6894f wpt-pr: 34686
Automatic update from web-platform-tests Introduce RequestInit.duplex This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740889 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020764} -- wpt-commits: 341bf2487ba47b9810a4dfa97752ffe57fa6894f wpt-pr: 34686
Oversight of #1457. Tests: web-platform-tests/wpt#36051 & web-platform-tests/wpt#36048. Closes #1486.
This implements whatwg/fetch#1457. Bug: 1337696 Change-Id: I3fcf6f484dc922f5a875ed658adad33631d55115 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3740889 Commit-Queue: Yutaka Hirano <yhirano@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/main@{#1020764} NOKEYCHECK=True GitOrigin-RevId: b4fc85b816b6e74d4c9ef60572bd66026c44d26a
Introduce the member, and throw if init.duplex is not set in the
Request constructor, as discussed at #1438.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff