Guest User

Untitled

a guest
Apr 20th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. getProfile(){
  2. let headers = new Headers();
  3. this.loadToken();
  4. headers.append('Authorization', this.authToken);
  5. headers.append('Content-Type','application/json');
  6. return this.http.get('http://localhost:8080/users/profile',{headers: headers})
  7. .map(res => res.json());
  8. }
  9.  
  10. this.authService.getProfile().subscribe(profile => {
  11. this.user = profile.user;
  12. },
  13. err => {
  14. console.log(err);
  15. return false;
  16. });
Add Comment
Please, Sign In to add comment