Answers for "get headers from HTTPHeaders angular"

0

angular httpheaders example

let headers = new HttpHeaders({ 'Access-Control-Allow-Origin': '*','content-type': 'application/json'}  )
console.log(headers)
Posted by: Guest on June-12-2021
1

angular get response headers

this.authenticationService.login(this.f.email.value, this.f.password.value)
  .pipe(first())
  .subscribe(
    (data: HttpResponse<any>) => {
      console.log(data.headers.get('authorization'));
    },
    error => {
      this.loading = false;
    });

At my Service Side.

return this.http.post<any>(Constants.BASE_URL + 'login', {username: username, password: password},
  {observe: 'response' as 'body'})
  .pipe(map(user => {
       return user;
  }));
Posted by: Guest on May-14-2020

Code answers related to "get headers from HTTPHeaders angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language