Skip to content Skip to sidebar Skip to footer

Titanium Httpclient Returns Too 'fast'

I have the following function: getTasks: function() { var taskRequest = Titanium.Network.createHTTPClient(); var api_url = 'http://myawesomeapi.heroku.com/use

Solution 1:

You are getting empty alert because when the bottom alert is executed the server response is not available and tasks array is empty.

When the server response comes the tasks array is populated by the code which you have in the onload handler so you see the tasks in the second alert.

Post a Comment for "Titanium Httpclient Returns Too 'fast'"