2

I am using angular 7 HttpClient to make a HTTP GET request from a Spring Rest Controller which is returns a XML response.

The problem I have is how can I convert XML response to a JSON object

I've tried using the below code, but it prints XML response in Text

const httpOptions = {
  'responseType'  : 'xml' as 'json'

};

return this.http.get(this.url+"/items/"+ID,httpOptions);
Sahan.java
  • 70
  • 12

0 Answers0