以下是我针对DELETE请求的Ajax请求:
deleteRequest: function (url,Id,bolDeleteReq,callback,errorCallback) { $.ajax({ url: urlCall,type: 'DELETE',headers: {"Id": Id,"bolDeleteReq" : bolDeleteReq},success: callback || $.noop,error: errorCallback || $.noop }); }
解决方法
阅读此Bug问题:
http://bugs.jquery.com/ticket/11586
The
DELETE@H_301_15@ method requests that the origin server delete the resource identified by the Request-URI.
所以你需要传递URI中的数据
$.ajax({ url: urlCall + '?' + $.param({"Id": Id,"bolDeleteReq" : bolDeleteReq}),error: errorCallback || $.noop });