how to change the headers for angularjs $http.jsonp

There is no way to control headers sent by a browser while using JSONP. JSONP is a smart trick (or a hack, depending on how you see it…) that consist of inserting a <script> tag pointing to a server endpoint. Ultimately it is a browser who will decide which headers to sent while requesting scripts via <script> tag and you can’t influence it.

More info here: Modify HTTP Headers for a JSONP request

Leave a Comment