Utilizing the HttpClient to fetch Json data from an API, I am utilizing the autoMapping feature of the HttpClient to map the json response to a specified object in this manner:
this.httpClient.post<Person>(url, body, { headers: headers, params: httpParams }).retry(ConfigurationService.apiHttpRetries)
The issue arises with my Person class as it includes getters such as:
get FullName() { return `${this.firstName} + ' ' ${this.lastName}`; }
Following httpClient.Post, the resulting Person object only contains the fields returned from the json and does not include other properties or the FullName getter.
I attempted using Object.Assign but that did not resolve the issue...
What is the underlying functionality of the httpClient.post generic method if it does not perform mapping and simply returns JSON.parse(jsonResult)?