Just do. Bearer tokenvalue
Not bearer token tokenvalue
On Sat, Feb 13, 2021, 10:28 PM [email protected] <
[email protected]> wrote:
> Hi
>
> So far I have this in my service file:
>
> *getProfile() {*
> *const token = localStorage.getItem('token');*
> *const header = new HttpHeaders().set('Bearer Token: ', token);*
> *return this.http.get(this.authUrl + 'profile', {*
> *headers: header,*
> * });*
> * }*
>
>
> I am getting 401 unauthorized but I am logging in!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/angular/83344679-0629-44be-915b-8c16da1b0708n%40googlegroups.com
> <https://groups.google.com/d/msgid/angular/83344679-0629-44be-915b-8c16da1b0708n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/angular/CACA0ezW9d4DeQqcs-oXFR34O%2BF8X5Db%2BcejqNxaUTfPhDvvG9Q%40mail.gmail.com.