How do I copy a Request object with a different URL?
I'm writing a wrapper around fetch that I would like to add something to the URL before making the request e.g. identifying query parameters. I can't figure out how to make a copy of a given a Request object with a different URL than the original. My code looks like: // My function which tries to modify the URL of the request function addLangParameter(request) { const newUrl = request.url + "?lang=" + lang; return new Request(newUrl, /* not sure what to put here */); } // My fetch wrapper function myFetch(input, init) { // Normalize the input into a Request object return Promise.resolve(new