How to get current datatable request
How to get current datatable request
ShaNic
Posts: 5Questions: 2Answers: 0
Hi everyone,
I'm new with Datatables.
I'm using this library in an Angular App using server-side.
I do something like this for my table ::
this.dtOptions = {
pagingType: 'numbers',
serverSide: true,
processing: true,
dom: 'tlip'
ajax: {
url: myServerUrl/people',
type: 'GET'
},
},
columns: [{ data: name}]
};
i want to get the end of the request of the current displaying table (filters,..). (Part of the request after "/people")
Is it possible to get and display it in console this part of the request ( draw=1&column... ) ?
Thanks !
Nick
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
No, there isn’t a way to get the inprogress Ajax call. What is the intention here? If you want to get the data that DataTables is sending to the server you can use the
preXhr
event.Allan
Hi Allan,
I found this :
But now, when I want to use the result of dtInsance.ajax.params() in a function, i deserialize json with JSON.stringify(dtInstance.ajax.params) but i have
I want string.
Ty
Nick
You want the JSON object as a string? Use JSON.stringify(...)`.
Allan
Hi,
I just found my soluce!
i should use
Thanks for ur time and ur help !