I am trying to have access to the result of an http request in my service:
getFriendsProfile(email) {
return this.http.get(environment.apiBaseUrl + '/profile/' + email);
}
However, console.logging the user profile returns a subscriber but not the information I am looking for. How do I get the info?
ngOnInit() {
this.userProfile = this.userService.getUserProfile().subscribe((res) => {
this.userProfile = res;
});
console.log(this.userProfile);
}