Skip to content

Instantly share code, notes, and snippets.

@kwhinnery
Created October 27, 2009 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwhinnery/219640 to your computer and use it in GitHub Desktop.
Save kwhinnery/219640 to your computer and use it in GitHub Desktop.
var c = Titanium.Network.createHTTPClient();
c.onload = function() {
var f= Titanium.Filesystem.getFile("xhr.png");
f.write(this.responseData);
document.getElementById('html').innerHTML = '<img src="'+f.url+'"/>';
};
// open the client
c.open('GET','http://www.appcelerator.com/wp-content/uploads/2009/06/titanium_desk.png');
// send the data
c.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment