bradtraversy / meanauthapp

Complete MEAN stack app with authentication
242 stars 152 forks source link

change your code like this #55

Open KishanMaurya opened 3 years ago

KishanMaurya commented 3 years ago

change your code like this

getProfile(){
    let headers = new Headers();
    this.loadToken();
    headers =   headers.append('Autherization', this.authToken);
    headers = headers.append('Content-Type', 'application/json');
    return this.http.get('http://localhost:3000/users/profile',{headers: headers})
    .map(res => res.json());

Originally posted by @DilshanDilipudara in https://github.com/bradtraversy/meanauthapp/issues/7#issuecomment-604824310