I'm trying to use a rest service with jqgrid according to this question and I want to set "DELETE" metod for all my grids, but jqgrid still uses POST as the method for sending delete requests. This how I'm doing it:
$.extend($.jgrid.del, {
mtype: "DELETE"});
and this is my grid instance delete options in navGrid:
{
url: '../../webresources/routing/phoneNumber',
serializeDelData: function () {
return ""; // don't send and body for the HTTP DELETE
},
onclickSubmit: function (params, postdata) {
params.url += '/' + encodeURIComponent(postdata);
},
errorTextFormat: function (data) {
return 'Error: ' + data.responseText;
}
}
If I set mtype:"DELETE" in navGrid delete options it is working as expected.