Server Side Processing setting dataType to json
Server Side Processing setting dataType to json
Is there a way (besides using the function type for "ajax" key) to set the dataType field of the ajax request? For example (see code below) if I set the "dataType" key I don't see any changes in the request Content-Type (it is always Content-Type:application/x-www-form-urlencoded; charset=UTF-8
). I have seen that the dataType key is usable to some extent in the following example [Datatables JSONP] (http://www.datatables.net/examples/server_side/jsonp.html).
"ajax": {
"url": "ajax/status",
"type": "POST",
"dataType": "json",
"data": function(d) {
return JSON.stringify(d);
}
}
This question has an accepted answers - jump to answer
Answers
Not the best question but I think copy/paste from a GET request factored in....just incase it is a helpful reminder to anyone else
was the attribute I was missing...
Good to hear you got a solution for this - thanks for sharing it with us.
Allan