I have an angular project at work that talks to an API I have no control over. It seems like that API is case sensitive on the headers, which I know isn't right but I can't do anything about it now. The latest versions of angular seem to be changing the case of all headers to lower case, is there any way of preventing that from happening ? If not I'll have to figure out how to downgrade all that I guess.
headers = new HttpHeaders(); headers = headers.set('MyGreatHeader', "value");
That's now sending: mygreatheader: value in the http request.
mygreatheader: value
Thank you
The issue is actually not angular but the version of HTTP, turns out HTTP/2 forces all header to be lower case. I've disabled HTTP/2 for now to fix it, while I try to get the API code addressed.
1.4m articles
1.4m replys
5 comments
56.9k users