Im new in Angular 2 framework and I try tu understand Http object. Im following the tutorial here:
http://www.joshmorony.com/using-http-to-fetch-remote-data-from-a-server-in-ionic-2/
Its perfect to retrieve JSON file from a server that provide this kind of data but I want to retrieve the HTML content into a variable. I would like to have all the html file and parse it to get some informations.
When I modify the URL in the example by a website like this:
this.http.request('https://www.google.ca/' ).map(res => res.text()).subscribe(data => {
this.webPage = data.toString();
console.log("data:" + data );
});
I got this error:
EXCEPTION: Response with status: 0 for URL: null
Do I use the good API? What im doing wrong?
Thanks, Pat