3
In my Angular 1 application, I’m using $httpProvider
to be able to set the content-type by default in all methods, but for GET methods, it does not send in its header. How can I force the angular to set the content-type in GET methods?
In config
$httpProvider.defaults.headers.common['Content-Type'] = 'application/json';
That’s what I’m talking about. Looking at the angular JS, the class responsible for sending requests to the server itself deletes the content-type when there is no payload in the request.
– Matheus