Sniberb
Sniberbβ€’2y ago

πŸŽƒ Spookyberb πŸŽƒ – 09-31 Nov 15

Im manually sending the Accept-Language header but at the call time it is getting ignored. Why? If I do it via postman it does return me the data in french, but with the JS fetch it doesnt
11 Replies
Sniberb
Sniberbβ€’2y ago
But I dont want to use a Wildcard I want to force a language I need to be able to send a request independently of the browsers language
ScriptyChris
ScriptyChrisβ€’2y ago
But does it work with wildcard at all? Does browser change request header then?
Sniberb
Sniberbβ€’2y ago
let me try give me a min
Sniberb
Sniberbβ€’2y ago
it doesnt
ScriptyChris
ScriptyChrisβ€’2y ago
You tried that on native fetch or some library?
Sniberb
Sniberbβ€’2y ago
native featch
ScriptyChris
ScriptyChrisβ€’2y ago
Can you show the code?
Sniberb
Sniberbβ€’2y ago
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
its just a normal fetch
ScriptyChris
ScriptyChrisβ€’2y ago
Hmm, weird πŸ€” Accept-Language is non-forbidden header, so it should be customisable
reactibot
reactibotβ€’2y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1042009004081172541