Recognize datatables ajax request

Recognize datatables ajax request

fischerfischer Posts: 10Questions: 6Answers: 0

Description of problem: Hello, I'd like to recognize in the backend requests made by the datatables library. Does the library issue any specific headers with its requests?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736
    Answer ✓

    I used the browser's Network Inspector tool to look at the request headers in this example. I didn't see anything Datatables specific. Although @allan can confirm. You could send your own customer header. See the ajax docs for details, specifically the Object Type.

    Kevin

  • fischerfischer Posts: 10Questions: 6Answers: 0

    @kthorngren Thank you. What exactly do I have to do to use the ajax option with custom headers? In the link you provided, I cannot find a mention of headers.

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736

    You will need to refer to the jQuery ajax docs for details. 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. Please refer to the jQuery documentation for a full description of the options available, although the following parameters provide additional options in DataTables or require special consideration:

    Kevin

Sign In or Register to comment.