🎃 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
S
Sniberb520d 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
S
ScriptyChris520d ago
But does it work with wildcard at all? Does browser change request header then?
S
Sniberb520d ago
let me try give me a min
S
Sniberb520d ago
it doesnt
S
ScriptyChris520d ago
You tried that on native fetch or some library?
S
Sniberb520d ago
native featch
S
ScriptyChris520d ago
Can you show the code?
S
Sniberb520d ago
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
its just a normal fetch
S
ScriptyChris520d ago
Hmm, weird 🤔 Accept-Language is non-forbidden header, so it should be customisable
UU
Unknown User520d ago