Re: [whatwg/fetch] Document usage for GET requests with URI parameters (#56)

@annevk, the URL objects do not have that `.searchParams` property. These are the fixes it requires:
```js
function urlWithParams(urlString, params={}) {
  var url = new URL(urlString);
  var searchParams = new URLSearchParams();
  Object.keys(params).forEach((key) => {
    searchParams.append(key, params[key]);
  });
  url.search = searchParams.toString();
  return url.toString();
}
```

Object.keys will return an array and the values will be lost in the foreach callback.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/56#issuecomment-222400044

Received on Monday, 30 May 2016 02:29:02 UTC