Ajax as path param

Ajax as path param

migmigmigmig Posts: 2Questions: 1Answers: 0

Hello,

I`m currently retrieving my json via ajax paginated, so in my server I mapped this url: "/page/{pageId}"
this way my get would be similar o "localhost/api/page/1" however I could not see any way to send my requested page as path param in documentation, I only found on how to send it as query param. How can I implement this?

I'm using Datatables version 1.10.12 and here is so far what I did:

$('#tableList').DataTable({
"info": true,
"pageLength": 10,
"retrieve" : true,
"serverSide": true,
"ajax": {
"url" : 'localhost/api/page/')
"dataSrc": function (json) {
return processColumns(json);
}
},
"columns" : [
/**/
]
});

Any idea on how can I get the current requested page to send in my ajax url path? Sending as 'localhost/api/page/1', 'localhost/api/page/2' and so on..?

Thank you very much!

Answers

This discussion has been closed.