I am trying to fetch access-token and uid from response headers of a post request, which looks like this
this is how i am trying to achieve it from service side
signup(postObj: any){
let url = environment.apiBaseUrl + "/v1/leads";
return this.http.post(url, postObj,{observe: 'response'});
}
Component side code
this.apartmentService.signup(obj).subscribe(data => {
console.log(data);
this.toastr.success('Registered successfully');
console.log(this.citydata,'this.citydata');
}
The method is not giving any response headers. Itried many solutions on internet but nothing works for me.
Any lead would be very helpful
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…