var jsonObj = JSON.stringify(obj); var header = new Headers(); header.append('Content-Type', 'application/json'); header.append('Accept', 'application/json'); var request = new Request(URL, { method: 'POST', mode: 'no-cors', body: jsonObj, headers: header }); fetch(request) .then( (responce) => { if (!responce.ok) { return Promise.reject(new Error( 'Responce failed: ' + responce.status + ' (' + responce.statusText + ')' )); } }) In IE, the header is sent as needed. But in Chrome and Firefox, when sending a request, the header becomes: "text / plain; charset = UTF-8". How to solve this problem?
mode: 'no-cors', then the headlines are set as expected, but why so, until I understood it - andreymal