From 505386adbad6a07285cfcd7e64a1b3e609c1c5e8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 2 May 2023 14:09:51 -0700 Subject: nfc wip --- src/lib/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/utils.js') 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' }; -- cgit v1.2.3