I'm using curl to get json data from nuxeo, this my curl function
curl -X POST -H "Content-Type:application/json+nxrequest" -d
"{ params:
{
query:'SELECT * FROM Document'
}
}" -u Administrator:Administrator http://localhost:8080/nuxeo/site/automation/Document.Query
this function run fine, but now (with ajax version) I have error http 500. this is the code of ajax version
function getData(){
var uri = "http://localhost:8080/nuxeo/site/automation/Document.Query" ;
var options = { method : 'post', data : 'query=SELECT * FROM Document' };
var myCall = new Ajax(uri,options);
myCall.request();
}