here is my code i'm calling a function
contenturlresp(id); Ti.API.info(e.index); function contenturlresp(id) { var url = Alloy.Globals.networkurl + "/lb/" + id + "/vu"; var xhr = Ti.Network.createHTTPClient({ // function called when the response data is available onload : function(e) { Ti.API.info("Received link details...: " + this.responseText); return this.responseText; }, // function called when an error occurs, including a timeout onerror : function(e) { alert(e); }, timeout : 5000 // in milliseconds }); // Prepare the connection. xhr.open("GET", url, false); // Send the request. xhr.setRequestHeader('Authorization', 'Basic ' + Ti.Utils.base64encode(username + ':' +password)); xhr.send(); };my problem is i need to get the response and then i want Ti.API.info(); statement should be executed.was not able to make this work pls help
i want the same code to be run in ios and android platfrom