Take the 2-minute tour ×

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";
     type: "GET",
     url: url+query,
     beforeSend: function (req) {
        req.setRequestHeader("Authorization", AuthBuilder(username,password));
     success: function (results) {
        $.each(results, function (i, item) {
            Projects[i] = item;

     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...

share|improve this question
you are not sending JSON data but you have set content-type to application/json ? –  SilentSakky Apr 11 '12 at 12:51
that just a copy paste thingy ^^ you think that would make the difference? There are posts as well that don't work.. who DO send JSON; Edit: as expected doesn't make any difference –  Arninja Apr 11 '12 at 14:19
add comment

1 Answer

up vote 0 down vote accepted

Forgot to add the dataType: "json" in the jquery ajax request. Now everything works just fine :)

share|improve this answer
add comment

Your Answer


