how to change the headers for angularjs $http.jsonp

前端 未结 1 1184
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 15:26

I read the document.

but I think I must have misunderstood it.

$http.defaults.headers.jsonp = { \'Accept\' : \'application/json\'};
$http.jsonp(url).         


        
1条回答
  •  甜味超标
    2020-11-30 15:38

    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

提交回复
热议问题