I’m using jQuery but the call just fails… It’s nothing extraordinary… just a request with some base64 authorization header in the beforeSend
function GetProjects(full){
var query = "/Projects";
$.ajax({
type: "GET",
url: url+query,
contentType: "application/json; charset=utf-8",
beforeSend: function (req) {
req.setRequestHeader("Authorization", AuthBuilder(username,password));
},
success: function (results) {
$.each(results, function (i, item) {
Projects[i] = item;
});
reloadui(full);
},
error: function (xhr, ajaxOptions, thrownError) {}
});
}
this is sent over https to a service that is running at the same machine but I’m not using localhost anywhere. URL looks something like this: https://www.MYNAMEHERE.be:port/Route.
Everything works in chrome / safari, but it fails in Firefox and Internet Explorer.
Thanks for reading
Edit: Setting the accepts header to JSON does not work either 🙂 Tried to debug with Live HTTP Headers on FF but did not get any headers at all…
Forgot to add the dataType: “json” in the jquery ajax request. Now everything works just fine 🙂