How to set the raw body in jQuery Ajax?

Try:

$.ajax('url',{
    'data': JSON.stringify(yourJSONObject), //{action:'x',params:['a','b','c']}
    'type': 'POST',
    'processData': false,
    'contentType': 'application/json' //typically 'application/x-www-form-urlencoded', but the service you are calling may expect 'text/json'... check with the service to see what they expect as content-type in the HTTP header.
});

Hope this helps,

Pete


if you dont specify the key i think it will post as the body without the key like

$.ajax({
data:JSON.stringify({action:'x',params:['a','b','c']})
});