400 Bad Request
400 Bad Request
slowaways
Posts: 3Questions: 1Answers: 0
I have a table of 1305 columns and my JSON request length is over 193100 characters!
How to disable all default parameters?
My JavaScript:
var table = $('#table').DataTable({
ordering: false,
searching: false,
//paging: true,
search: {"regex": false, "smart": false},
//processing: true,
serverSide: true,
//deferRender: true,
//deferLoading: 1116,
ajax: {
url: "result/data",
type: "POST",
data: function(data){
data.limit = 10;
data.offset = 0;
}
},
columnDefs: [
{
"defaultContent": "-",
"searchable": false,
"targets": '_all'
}
],
scrollX: true,
scrollY: 200,
lengthChange: false
});
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use
ajax.data
as a function to modify the data sent to the server. For example you coulddelete data.columns
to remove the individual column information.404 is the wrong status code for a bad request btw. It should be 400 - 404 is not found.
Allan
Yes, it is 400 code, sorry.
Can you give me an example in the code?
Ok. I delete data.columns and this solve my issue! Thanks!