diff options
| author | Adam Soltys <[email protected]> | 2022-09-07 13:58:00 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-07 13:58:00 -0700 |
| commit | 3170bcd8c9ed53d548b51254e20d1e027cb2c138 (patch) | |
| tree | 64192da314d8428746f649a1e8fc9fb7abb97633 /src/lib/utils.js | |
| parent | e0616f3ddd0cc006fa2a2f4493e623a4b86f276f (diff) | |
| download | coinos-ui-3170bcd8c9ed53d548b51254e20d1e027cb2c138.tar.gz coinos-ui-3170bcd8c9ed53d548b51254e20d1e027cb2c138.zip | |
image uploads
Diffstat (limited to 'src/lib/utils.js')
| -rw-r--r-- | src/lib/utils.js | 8 |
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 { |
