1this.authenticationService.login(this.f.email.value, this.f.password.value)
2 .pipe(first())
3 .subscribe(
4 (data: HttpResponse<any>) => {
5 console.log(data.headers.get('authorization'));
6 },
7 error => {
8 this.loading = false;
9 });
10
11At my Service Side.
12
13return this.http.post<any>(Constants.BASE_URL + 'login', {username: username, password: password},
14 {observe: 'response' as 'body'})
15 .pipe(map(user => {
16 return user;
17 }));