This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
polyfill.Fetch object request body (application/json ) being converted to string #160
Closed
Description
It seems that fetch() calls with a JSON body, the JSON is being converted to a string.
This is the whatwg-fetch way of doing a JSON post:
fetch(URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({abc: 123}),
});
I have also tried
fetch(URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: {abc: 123},
});
I think that polyfill.Fetch is converting my JSON-string into a string-containing-a-JSON-string.