基本上标题描述了一切。我发送一个API调用,得到响应,以授权的头,我想是因为它是需要subsuquent API调用从标题检索此授权令牌。我应该如何得到这个信息?
Basically the title has described everything. I send an api call, get a response, with Authorization in the header, and I want to retrieve this authorization token from the header because it is needed for subsuquent api calls. How should I get this info?
您应该看看这里:的 https://docs.angularjs.org/api/ng/service/$http
$http.get('yourUrl').
success(function(data, status, headers, config) {
console.log(headers);
})
上一篇:如何注入模块,并使其向入店角entrie应用使其、模块、entrie、入店角
下一篇:角"未知提供商QUOT; - 如何使用routeProvider配置中的工厂?如何使用、提供商、工厂、QUOT