Closed shivamsinha15 closed 8 years ago
Yes, you can accomplish this by defining custom function for fetching data from server:
$('textarea').mentionsInput({
source: function(request, callback) {
$.get({
url: 'http://example.com',
data: {term: request.term},
success: callback,
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", "Basic " + btoa(username + ":" + password));
}
});
}
});
hi I was wondering if there was anyway to add authorization header on ajax request ?