How to send additional data to server, PUT, DELETE, GET, POST?

How to send additional data to server, PUT, DELETE, GET, POST?

cris19ncris19n Posts: 55Questions: 18Answers: 0
edited December 2021 in DataTables 1.10

Hi guys.
I am building an API with php.
I need to support Datable with SERVERSIDE enabled.
These are all the methods in my API flow (GET, POST, PUT, DELETE).

and I need to know how the API consumer can send additional data on each request to the server.
the main reason is that the API needs to validate a TOKEN, to be able to show or not Data.

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,404Questions: 26Answers: 4,788
    Answer ✓

    The ajax docs state this:

    As an object, the ajax object is passed to jQuery.ajax allowing fine control of the Ajax request. DataTables has a number of default parameters which you can override using this option.

    You can set the type and other attributes supported by jQuery ajax(). The docs also mention you are not allowed to override the success function.

    You can use the ajax.data option to send additional data.

    Kevin

Sign In or Register to comment.