Sniberb
Sniberbβ€’3y 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
SniberbOPβ€’3y 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β€’3y ago
But does it work with wildcard at all? Does browser change request header then?
Sniberb
SniberbOPβ€’3y ago
let me try give me a min
Sniberb
SniberbOPβ€’3y ago
it doesnt
ScriptyChris
ScriptyChrisβ€’3y ago
You tried that on native fetch or some library?
Sniberb
SniberbOPβ€’3y ago
native featch
ScriptyChris
ScriptyChrisβ€’3y ago
Can you show the code?
Sniberb
SniberbOPβ€’3y ago
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
its just a normal fetch
ScriptyChris
ScriptyChrisβ€’3y ago
Hmm, weird πŸ€” Accept-Language is non-forbidden header, so it should be customisable
reactibot
reactibotβ€’3y 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