首页 > 应用开发 > > angular http 自定义头
看网上的例子太复杂了 、和官网的 求园友给个简洁版本的
如图:
$http({ headers: { 'token':"值" }, url: objValue.apiUlr + "Message/GetMsgList?ta", method: 'get' }).success(function (json, status, config) {
//do
});
在get或者post里面写自己定义的头 加token来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4547/viewspace-3156336/ ,如需转载,请注明出处,否则将追究法律责任。