How to add Authorization header to AJAX requests
How to add Authorization header to AJAX requests

Our API endpoint makes use of HTTP authentication. Currently, with jQuery we do the following:
[code]
$.ajax({
....
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', apiAuthorization);
},
....
});
[/code]
Is there anyway to apply this logic to the DataTables utility?
[code]
$.ajax({
....
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', apiAuthorization);
},
....
});
[/code]
Is there anyway to apply this logic to the DataTables utility?
This discussion has been closed.
Replies
Allan