[fetch] provide a way to construct a new Request from an old Request and an overriding URL (#129)

I've seen a couple different snippets of code now that try to override the URL on a Request.  They want to keep all attributes about the Request, but just change the URL.  All the code I've seen try this has gotten it wrong.  They always forget to propagate some field in Request, the body, headers, etc.  Its also hard to maintain as we keep adding attributes to Request.

It would be nice to have a constructor that consumes an old Request and override the URL.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/129

Received on Friday, 18 September 2015 15:01:06 UTC