Oh ok, I guess I could also do the following then
class JsonBody extends Blob {
constructor (obj) {
super([JSON.stringify(obj)], { type : 'application/json' })
}
}
fetch(url, { method: 'POST', body: new JsonBody({ hello: 'world' }) })
That's quite handy