-
Notifications
You must be signed in to change notification settings - Fork 385
Description
Hi, I'm trying to use fetch in Chrome but I think it's not working for me for one reason. I'll explain my use case and you can tell me if I can do something to use fetch.
I'm developing a Chrome extension (a content script) that reads from localStorage an auth token. This way I can make request agains a server. I'm not managing that server and I'm not the owner. I can't change anything on the server. The thing is that I'm trying this:
fetch(url, {
method: "GET",
headers: {
"Token": "auth-token-content-goes-hear"
},
})
But when I see the request on Chrome Dev Tools I see token instead of Token and the server is responding with 401. My first implementation is doing the same with jQuery and the server is returning results.
I understand the standard is put headers in lowercase. But maybe could be posible set a flag to skip it. In situations like mine (user can not change server) is not posible to use fetch.
BTW great work! I appreciate all the work you are doing here 💪
Thanks!