R
Reactiflux

๐ŸŽƒ Spookyberb ๐ŸŽƒ โ€“ 09-31 Nov 15

๐ŸŽƒ Spookyberb ๐ŸŽƒ โ€“ 09-31 Nov 15

Sโ›„Snowberbโ›„11/15/2022
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โ›„Snowberbโ›„11/15/2022
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
SScriptyChris11/15/2022
But does it work with wildcard at all? Does browser change request header then?
Sโ›„Snowberbโ›„11/15/2022
let me try give me a min
Sโ›„Snowberbโ›„11/15/2022
it doesnt
SScriptyChris11/15/2022
You tried that on native fetch or some library?
Sโ›„Snowberbโ›„11/15/2022
native featch
SScriptyChris11/15/2022
Can you show the code?
Sโ›„Snowberbโ›„11/15/2022
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
const response = await fetch('hiddenUrl', {
headers: {
'Accept-Language': '*',
},
});
its just a normal fetch
SScriptyChris11/15/2022
Hmm, weird ๐Ÿค” Accept-Language is non-forbidden header, so it should be customisable
UUUnknown User11/16/2022
Message Not Public
Sign In & Join Server To View

Looking for more? Join the community!

R
Reactiflux

๐ŸŽƒ Spookyberb ๐ŸŽƒ โ€“ 09-31 Nov 15

Join Server