From 3170bcd8c9ed53d548b51254e20d1e027cb2c138 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 7 Sep 2022 13:58:00 -0700 Subject: image uploads --- src/lib/utils.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/lib/utils.js') diff --git a/src/lib/utils.js b/src/lib/utils.js index ecf93062..0f665ec4 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -20,12 +20,8 @@ export const get = (url, headers = {}) => }); export const post = (url, body, headers) => { - headers = { ...headers, 'content-type': 'application/json' }; - return fetch(base + url, { - method: 'POST', - body: JSON.stringify(body), - headers - }) + headers = { ...headers, 'content-type': 'application/json', accept: 'application/json' }; + return fetch(base + url, { method: 'POST', body: JSON.stringify(body), headers }) .then((r) => r.text()) .then((body) => { try { -- cgit v1.2.3