Firstly : Use an object instead of new Headers(..):
fetch('www.example.net', {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
'X-My-Custom-Header': 'value-v',
'Authorization': 'Bearer ' + token,
}
});
Secondly : Good to know, headers are lowercased by fetch!!
ThridlyThirdly : no-cors mode limitelimits the use of headers to this white list :
AcceptAccept-LanguageContent-LanguageContent-Typeand whose value is (application/x-www-form-urlencoded,multipart/form-data,text/plain)
That's why only your Content-Type header is sent and not X-My-Custom-Header or Authorization.