Fetch url
Hello.
I wonder if anyone knows how to fetch a webpage source code? Is it possible with GET?
3 Answers
-
Accepted Answer
try this:
var xhr = Titanium.Network.createHTTPClient(); xhr.onload = function() { sourcecode = this.responseText; Titanium.API.info(sourcecode); }; xhr.open("GET","http://google.com"); xhr.send();
-
try HttpClient
-
Tamas Daniel:
I've allready tried a few methodes and properties in HttpClient. But I can't get it to work.