Hi, I have been reading through the Q+A of other members trying there solutions but none of them are working for me. I have a button event when clicked i wish to get the values from the text fields on the mobile client and post them to the web service url here i keep getting 'error sending data' - what am i missing something on the servlet API side? thanks for your help
button.addEventListener('click', function(e) { var params = { "places" : { Country : textCountry.getValue(), Capital : textCapital.getValue() } }; var xhr = Ti.Network.createHTTPClient({}); // function to deal with errors xhr.onerror = function() { Ti.API.info('error, HTTP status = ' + this.status); alert('Error Sending Data'); }; //set enconding xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8"); xhr.open("POST", 'http://130.206.127.43:8080/Test'); xhr.send({ "places" : JSON.stringify(params) }); });