首页 新闻 赞助 找找看

angular http 自定义头

0
悬赏园豆:10 [已解决问题] 解决于 2016-07-06 15:19

看网上的例子太复杂了 、和官网的 求园友给个简洁版本的

如图:

$http({ headers: { 'token':"" }, url: objValue.apiUlr + "Message/GetMsgList?ta", method: 'get' }).success(function (json, status, config) {
      //do 
    });

 

在get或者post里面写自己定义的头 加token 

s_p的主页 s_p | 初学一级 | 园豆:138
提问于:2016-05-20 17:05
< >
分享
最佳答案
0

http://stackoverflow.com/questions/15598917/adding-a-custom-header-to-http-request-using-angular-js

收获园豆:10
Yu | 专家六级 |园豆:12980 | 2016-05-21 10:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册