1

I use HttpClient to call a GET method frop an API that returns a whole HTML page. Until now i just added a parameter "responseType" and gave it the value "document". recently i updated my angular cli version and now the response type can only be one of the followings:

  1. text
  2. json
  3. arraybuffer
  4. blob

neither of the above is the right type, i get the whole page as a very long string. How to i make the http request to read the result as an html? or how i can i convert a string to an html document, where i can call methods like "getElementById" and such

oded bartov
  • 391
  • 1
  • 2
  • 9

0 Answers0