xhrFields:{ responseType: 'blob' }
$.ajax({
url: MY_URL_,
method: "GET",
xhrFields: {
responseType: 'blob'
},
headers: {
"Authorization": "Basic YAZRt45aWDa25wDDdFND232YFmVmb23213ffWEa5OA=="
}
}).then(response => {
console.log(response);
$('#canvas').attr('src', URL.createObjectURL(response));
}).catch(error => {
console.log(error);
})