我正在通过以下配置使用Tabulator远程分页
table = new Tabulator("#data-table", {height : "800px",
pagination : "remote",
overflow:"auto",
layout : "fitData",
paginationButtonCount : 6,
ajaxFiltering:true,
headerFilterPlaceholder:"",
ajaxSorting:true,
placeholder : "No Records Found. Click on 'Clear All Filters' button to clear the filters if any",
keybindings:false,
ajaxURL: "findDataSet",
ajaxConfig:{
method:"POST",
},
ajaxContentType:"JSON",
columns : columsData,
ajaxParams:{waveId:waveId,primaryClecName : primaryClecName,status:status,noOfCircuits:noOfCircuits},
paginationDataReceived:{
"last_page":"maxNumberOfPage",
"data":"ntportalFields", }
});
我期望Java服务中的请求有效负载(JSON格式)。但是我正在获取如下表单数据。
------WebKitFormBoundary9ajA2zFVTs7hpxzL
Content-Disposition: form-data; name="waveId"
11833
------WebKitFormBoundary9ajA2zFVTs7hpxzL
Content-Disposition: form-data; name="primaryClecName"
ACCESS%20POINT%20INC
------WebKitFormBoundary9ajA2zFVTs7hpxzL
Content-Disposition: form-data; name="status"
Migration%20Complete
------WebKitFormBoundary9ajA2zFVTs7hpxzL
Content-Disposition: form-data; name="noOfCircuits"
5
------WebKitFormBoundary9ajA2zFVTs7hpxzL
Content-Disposition: form-data; name="page"
1
------WebKitFormBoundary9ajA2zFVTs7hpxzL
Content-Disposition: form-data; name="size"
如何获取JSON格式? 预先感谢:)
答案 0 :(得分:0)
您遇到的问题是因为您已经将传递给 ajaxContentType 属性的值大写了
ajaxContentType:"JSON",
应该是:
ajaxContentType:"json",