automatic jquery interceptor with token code example
Example: automatic jquery interceptor with token
$.ajaxSetup({
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', 'Token 123')
}
});
$.ajaxSetup({
beforeSend: function (xhr) {
xhr.setRequestHeader('Authorization', 'Token 123')
}
});