【发布时间】:2016-10-28 20:39:21
【问题描述】:
我需要从 auth0 (https://auth0.com/docs/api/management/v2#!/Users/get_users) 从 anguler2 获取所有用户。 这是我试过的。我知道我必须在某处添加访问令牌。请指出正确的方向。
var headers: any = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
this.authHttp.get('https://nsrevo.au.auth0.com/api/v2/users?search_engine=v2', { headers: headers})
.map(response => response.json())
.subscribe(
response => {
console.log(response);
},
error => alert(error.json().message)
);
【问题讨论】: