By default, the Ajax request that DataTables makes to obtain server-side processing data is an HTTP GET
request. However, there are times when you might wish to use POST. This is very easily done by using the
type
option of the ajax
initialisation
option.
When given as an object, the ajax
option maps directly
onto the jQuery ajax options (i.e. any option that can be used
in jQuery's Ajax function can also be used in DataTable's ajax
option).
The example below shows ajax
being used with the
type
option set to 'POST' to make a POST request rather than GET.
Name | Age | Position | Office | Start date | Salary |
---|---|---|---|---|---|
Name | Age | Position | Office | Start date | Salary |