title: Is Digest authentication possible with jQuery?
body: <p>I'm trying to send a request that requires HTTP Digest authentication. </p>
  
  <p>Is Digest possible in jQuery? </p>
  
  <p>If so, is this close to the correct way to do it?  It's not currently working.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $.ajax({
          url: url,
          type: 'GET',
          dataType: 'json',
          success: function() { alert('hello!'); },
          error: function() { alert('error')},
          beforeSend: setHeader
  
      });
  
      function setHeader(xhr){
          xhr.setRequestHeader("Authorization", "Digest username:password");
          xhr.setRequestHeader("Accept", "application/json");
      }
  &lt;/script&gt;
  </code></pre>