I'm running into an issue where data are removed from the request when I use POST. Same call to the back-end server from a different client (iPad app) works fine. If I change to GET, then the data are preserved. Here are what I have in my script:
var request = $.ajax({
url: "http://localhost/demo/requirements",
type: "POST",
contentType: 'application/json',
data: {token: 'XXXXXXXXX', varid: 'XXXXX},
dataType: 'json',
cache: false,
});
This is what I see from tunnel. My back-end code fails to process the request since no POST data. Could you please let me know what is wrong here?
OPTIONS /demo/requirements HTTP/1.1
Host: localhost:81
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Origin: http://localhost:8060
Access-Control-Request-Method: POST
Thanks,
Stanley