Sending the request below in my Android app for Android apps for GET but not POST. Everything works with GET. With POST, the request passes, but the POST variables do not pass through the server, and the server returns json, which says that "parameters are not specified."
POST works great with our mobile application - it's just a phonegap application in which we have a problem. What am I missing here ??? Thanks in advance for any help you can provide!
I tried changing the settings to calling $ .ajax, the android manifest, all I can think of.
In addition, I use Android 2.2 and Phonegap 1.0.
function goTeam(){ var dataString={lat:currentLocation.lat(),lng:currentLocation.lng()}; // this all works $.ajax({ url: 'http://example.com/request/goTeam', data: dataString, dataType: 'json', success: function(b) { if(b.status==1){ // woo hoo! it works } else { // the request went through but something was wrong - this is what i'm getting with POST } }, type: 'post', // works with GET, doesn't work with POST error: function(jqXHR, textStatus, errorThrown){ alert("Noooo."); } });
source share