As per tabulator documentation the ajax request can be made using the format like this
Ajax documentiation : .5/data#ajax
var table = new Tabulator("#example-table", {
ajaxURL:aglAjax.ajax_url,
ajaxParams:{tabledata:aglAjax.data},
ajaxConfig:{
method: 'GET',
mode:"cors", //set request mode to cors
credentials: "same-origin", //send cookies with the request from the matching origin
headers: {
"Accept": "application/json", //tell the server we need JSON back
"X-Requested-With": "XMLHttpRequest", //fix to help some frameworks respond correctly to request
"Content-type": 'application/json; charset=utf-8', //set the character encoding of the request
},
},
ajaxResponse:function(url, params, response){
//url - the URL of the request
//params - the parameters passed with the request
//response - the JSON object returned in the body of the response.
alert("Response Recived");
console.log(response);
return response; //pass the data array into Tabulator
},
});
I am passing the data using localize script and tested if the data is passed. I am able to pass the variables, they show up correctly but I get 400 error every time ..not sure where I am making the mistake..can't tabulator ajax method be used in WordPress?