title: Getting error 401 when using httr get
body: <p>I am trying to use R to access a web page in our organization using httr GET.</p>
  
  <p>However i get a message that "Access is denied due to invalid credentials".
  I can do the desired action manually.
  it seems that authorization is done automatically when i use internet explorer to get to the web site but the access is blocked when trying to do the same action through R.</p>
  
  <p>This is how i'm trying to do it:
  (I can't supply the exact address because it's an intranet address which can be used only inside the organization the same for the proxy address)</p>
  
  <pre><code>library(httr)
  r &lt;- GET(myurl, useproxy(myproxyid, 80), verbose())
  
  -&gt; GET http: //myurl
  -&gt; host: xxx
  -&gt; User-Agent : libcurl...
  -&gt; Accept-Encoding: gzip, deflate
  -&gt; Proxy-Connection: Keep-Alive
  -&gt; Accept: application/json, text/xml, application/xml, *.*
  &lt;- HTTP/1.1 401 Unauthorized
  &lt;- Content-Type: text/html
  &lt;- Server: Microsoft-IIS/8.5
  &lt;- WWW-Authenticate: Negotiate
  &lt;- WWW-Authenticate: NTLM
  &lt;- X-Powered-By: ASP.NET
  
  r
  
  Response [myurl]
  Date
  Status: 401
  ...
  &lt;title&gt;401 - Unauthorized: Access is denied due to invalid credentials.&lt;/title&gt;
  
  ....
  </code></pre>
  
  <p>I understand that i somehow have to send my credentials with my request.
  is it possible to somehow use automatic authentication?</p>
  
  <p>Thanks
  Rafael</p>