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
commit7f3dc05c74586f4777c4a51ebf2c831da91c6c0c (patch)
tree687beb156c8654b1b4fc3a63955ece6c65a1844e /src/lib/utils.js
parent89b13556338c9a31e4d911decd4c67ce0fe6790b (diff)
downloadcoinos-ui-7f3dc05c74586f4777c4a51ebf2c831da91c6c0c.tar.gz
coinos-ui-7f3dc05c74586f4777c4a51ebf2c831da91c6c0c.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' };