title: Java RESTful client [RESTEasy or Apache HttpClient] - NTLM on the other side
body: <p>How to call RESTful webservice (from Java - using RESTEasy/Apache HttpClient) which requires NTLM authentication within Active Directory, without necessity of entering user data again (domain, username, password) - user is already authenticated in Windows?</p>
  
  <pre><code>GET http://some_server/restapi/books
  </code></pre>
  
  <p>This works perfectly from web browsers or even java.net.URL library - user is not getting prompted for credentials, no 401 authentication errors - simply <code>200 OK</code> is returned.</p>
  
  <p>How to do the same using Apache HttpClient or RESTEasy client?</p>