title: PhoneGap - Windows Authentication Request with JQuery
body: <p>I am trying to access a webservice that has <strong>Windows authentication</strong>. I am basically using most of what is written on <a href="http://blog.luksidadi.com/phonegap-cross-domain-ajax-call-basic-http-auth-to-restful-api/" rel="nofollow">this</a> page:</p>
  
  <pre><code>$.ajax({
      url: url,
      method: 'GET',
      async: true,
      data: {},
      dataType: 'json',
      crossDomain: true,
      xhrFields: {
          withCredentials: true
      },
      beforeSend: function(xhr) {
          // set authorization header
          xhr.setRequestHeader("Authorization", "Basic " + Base64.encode(username + ":" + password));
      },
      success: function(data){
                  // success
      },
      error: function(request, status, error) {
          // handle problem
      }
  });
  </code></pre>
  
  <p>I also defined the external hosts on the .plist file. My issue is that I always get an error. To make it worst, nothing comes out on the error function that is slightly useful (this output is from Firefox, to simplify):</p>
  
  <pre><code>Object { readyState=0, status=0, statusText="error"}
  </code></pre>
  
  <p>I also tried on the simulator, but instead of immediately giving me the error I think its timing out. What I have been seeing, and what I am using, is a request using <strong>Basic authentication</strong>. So is there a way to actually implement this using <strong>Windows authentication</strong>?</p>