If I point my browser to a url, it successfully displays the request REST info for an RTC work item.
I'd like to get the same info using an ajax call from a webpage on another server. However, when trying access I get errors.
The first step is to create a proxy on the webserver so it gets around the ajax x-domain limitation. I then have a webpage on this same webserver that makes an ajax call to another URL using the get URL function below.
However, it fails trying to display the jazz username/password screen and just continuously display s a "Loading..." message.
I've tried to include the username/password as part of the jax call, but that doesn't seem to bypass the Jazz authentication either.
function get_url( urlx ) {
var username = "user123";
var password = "password123";
var txt = "";
$.ajax({
url: urlx,
type: "GET",
dataType: "text",
async: false,
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', make_base_auth(username, password));
},
success: function(data){
txt = data;
},
error: function(msg){
}
});
return txt;
}