Skip to content
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

Reuest.body value after passed to another Request #60

Closed
yutakahirano opened this issue Oct 23, 2015 · 5 comments
Closed

Reuest.body value after passed to another Request #60

yutakahirano opened this issue Oct 23, 2015 · 5 comments
Assignees

Comments

@yutakahirano
Copy link
Owner

req2 = new Request(req);

At whatwg/fetch#61, we agreed that

  • req.bodyUsed should be false if req had null body, and
  • req.bodyUsed should be true if req had a non-null body.

Anne proposed to introduce obsolete flag in order to make req.body null and req.bodyUsed true after passing the body, but it looks like another passed flag we replaced with ReadableStream.IsDisturbed. @jakearchibald's piping idea sounds cleaner to me and ideally it should work, but I'm not sure about its performance.

Thoughts?

cc: @domenic @wanderview @tyoshino

@yutakahirano
Copy link
Owner Author

cc: @annevk

@annevk
Copy link

annevk commented Oct 28, 2015

I'm okay either way. I guess someone should measure the performance of doing piping if we are fine gating on that?

@domenic
Copy link
Contributor

domenic commented Aug 2, 2016

Is this solved currently? I lost track. If it is not, it probably can be solved similarly to w3c/ServiceWorker#934 ?

@yutakahirano
Copy link
Owner Author

It's not yet solved, and it should be solved as same as w3c/ServiceWorker#934.

@annevk
Copy link

annevk commented Jan 17, 2017

What is the status of this issue? I missed it while merging in stream-based requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants