I'm creating a site for an assignment, where I want to dynamically load some data. Problem is, that data just comes from a website, no API or anything. Is there some way that I can use http.get in angular to pull the whole site as raw HTML, which I can then parse for info?
Thanks
You can set the responseType to "text" to fetch the response as a string.
this.httpClient.get(url, {responseType: "text"})
See overload method #3:
https://angular.io/api/common/http/HttpClient#get
Note: Cross domain requests for GET are subject to CORS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With