I have developed a REST service in Angular that sends back JSON response. To perform pattern matching and value replacement, I require the response as a string.
Currently, I am utilizing Angular 7 for this task. Below is an example of my service:
getUIData(): Observable<any> {
const url = `${this.baseUrl}/uiData`;
return this.http.get<any>(url).pipe(
catchError(this.handleError<any>('Get Data:'))
);
}