I am attempting to extract access-token and uid from the response headers of a post request, as shown in the screenshot at this https://i.sstatic.net/8w8pV.png
Here is how I am approaching this task from the service side:
signup(postObj: any){
let url = environment.apiBaseUrl + "/v1/leads";
return this.http.post(url, postObj,{observe: 'response'});
}
On the component side:
this.apartmentService.signup(obj).subscribe(data => {
console.log(data);
this.toastr.success('Registered successfully');
console.log(this.citydata,'this.citydata');
}
https://i.sstatic.net/zV6qi.png Unfortunately, the method does not return any response headers. I have tried multiple solutions found online, but none have worked for me. Any guidance would be greatly appreciated.
Thank you!