bajo-extra 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,11 @@ async function fetchUrl (url, opts = {}, extra = {}) {
38
38
  }
39
39
  opts.body = formData
40
40
  }
41
+ if (opts.query) {
42
+ // todo: what if url already contain query string?
43
+ const query = new URLSearchParams(opts.query)
44
+ url += '?' + query
45
+ }
41
46
  const resp = await fetch(url, opts)
42
47
  if (extra.rawResponse) return resp
43
48
  return await resp.json()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo-extra",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Extra package for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {