How to add Authorization header to AJAX requests
How to add Authorization header to AJAX requests
conrad10781
Posts: 2Questions: 0Answers: 0
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