aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js8
1 files changed, 2 insertions, 6 deletions
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 {