aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-05-02 14:09:51 -0700
committerAdam Soltys <[email protected]>2023-05-02 14:09:51 -0700
commit505386adbad6a07285cfcd7e64a1b3e609c1c5e8 (patch)
tree687beb156c8654b1b4fc3a63955ece6c65a1844e /src/lib/utils.js
parentb563ab987b0625cdd6d5d9152039d5eef70d69f1 (diff)
downloadcoinos-ui-505386adbad6a07285cfcd7e64a1b3e609c1c5e8.tar.gz
coinos-ui-505386adbad6a07285cfcd7e64a1b3e609c1c5e8.zip
nfc wip
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index 5eef79fc..be26ee45 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -25,8 +25,9 @@ export let g = (url, fetch, headers) =>
}
});
-export let get = (url, headers = {}) =>
- fetch(base + url, { headers })
+export let get = (url, headers = {}) => {
+ console.log("GETTING", browser, base, url);
+ return fetch(base + url, { headers })
.then(async (r) => {
if (r.ok) return r.text();
throw new Error(await r.text());
@@ -38,6 +39,7 @@ export let get = (url, headers = {}) =>
return body;
}
});
+}
export let post = (url, body, headers) => {
headers = { ...headers, 'content-type': 'application/json', accept: 'application/json' };