I used
- jquery V3.6.3
- method: GET
if I set header Authorization value, it don't work.
this work
$.ajax({
type: "GET",
url:'https://........../test',
success: function (data){
},
error: function (xhr, ajaxOptions, thrownError, request, error){
}
});
this don't work
$.ajax({
type: "GET",
url:'https://........../test',
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", "Basic " + btoa(username + ":" + password));
},
success: function (data){
},
error: function (xhr, ajaxOptions, thrownError, request, error){
}
});
I tried many options, one at time or more at time
async: false,
crossDomain: true,
dataType: "jsonp"