I encounter a problem when I cannot configure the headers for the select query, and I think I am missing something
var init = { method: 'GET', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer myKey' } }; return fetch(url, init).then(function(response){...
When the request is checked on the network tab, I donβt see the headers set, but instead they see
Access-Control-Request-Headers:accept, authorization, content-type
when i expect to see
Authorization: Bearer myKey Content-Type: application/json Accept: application/json
I also tried using the native Headers () with zero difference.
Did I miss something?
source share