Ajax GET Prompting for Credentials

Ajax GET Prompting for Credentials

Hello:

I'm making the following Ajax call using credentials I've read from a JSON file. The credentials passed here are correct (I've verified using a debugger); however, I'm still prompted to enter them despite them being passed in the ajax call.

What am I doing wrong?

// Load data into jsGrid
function loadGrid () {
$ . ajax ({
type: 'GET' ,
xhrFields: {
withCredentials: true
},
headers: {
'Authorization' : 'Basic ' + btoa ( window . creds . kudosapi . user + ':' + window . creds . kudosapi . password )
},
dataType: 'json' ,
....