Ajax http request
$.ajax({
url: 'http://localhost:8080/service/data',
type: 'GET',
dataType: 'json',
success: function(response) {
console.log('ok');
},
error: function (request, errorText, errorThrown) {
console.log('error: ' + errorThrown);
},
beforeSend: function (hdr) {
hdr.setRequestHeader('Authorization', 'TEST_USER test%3Atest');
}
});