Syntax for withCredentials

Syntax for withCredentials

jnedzeljnedzel Posts: 28Questions: 4Answers: 0

I'm circling back to this question:

https://datatables.net/forums/discussion/24838/proper-syntax-for-withcredentials

As you suggested, I have changed to the new Ajax syntax:

            oTable.dataTable({
                "ajax": {
                    "url": theUrl,
                    "dataSrc": "gene"
                },
                deferRender : true,
                destroy : true,
                retrieve : true,
                jQueryUI : true,
                processing : true,
                paginationType : "full_numbers",
                columns :  columnProps,
                dom: 'T<"clear">lfrtip',
                tableTools: tableToolsProps,
                language: {
                    emptyTable: "Please wait - Fetching records"
                },

But I've looked through the documentation and still don't see the syntax for setting withCredentials = False.

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    From the jQuery documentation you would do something like:

    oTable.dataTable({
        "ajax": {
            "url": theUrl,
            "dataSrc": "gene",
            xhrFields: {
                withCredentials: false
            }
        },
    

    Allan

  • jnedzeljnedzel Posts: 28Questions: 4Answers: 0

    Allan, thanks. That worked perfectly.

This discussion has been closed.