title: Can I suppress the browser’s login prompt on 401 response when using XmlHttpRequest with Twitter
body: <p>I'm using jQuery's ajax methods to interact with the <a href="http://apiwiki.twitter.com/REST+API+Documentation" rel="nofollow noreferrer">Twitter REST API</a>.</p>
  
  <p>Their API is a bit annoying, in that some actions will return a 401 HTTP status code.  In that case, I just want it to fail, instead of displaying a login box.</p>
  
  <p>I've tried just providing an incorrect user:pass pair in the URL, in case that might suppress the dialog and just get me an error response, but that failed to help.</p>
  
  <p><a href="https://stackoverflow.com/questions/361467/is-there-any-way-to-suppress-the-browsers-login-prompt-on-401-response-when-usi">This question</a> asked exactly the same question, but the answer instead worked out how to not trigger the 401 in the first place.</p>
  
  <p>(In particular this is annoying because it's a bug on their part that's requesting authentication -- the <code>users/show</code> method isn't supposed to be asking for it in the first place.)</p>