title: How to properly set cookies to get URL content using httr
body: <p>I need to download information from web site that is protected using cookies. I pass this protection manually and then insert cookies to <code>httr</code>. </p>
  
  <p>Here is similar topic, but it does not solve my problem: (<a href="https://stackoverflow.com/questions/25374231/copying-cookie-for-httr">Copying cookie for httr</a>)</p>
  
  <pre><code>library(httr)
  url&lt;-"http://smida.gov.ua/db/emitent/year/xml/showform/32153/125/templ"
  
  cook&lt;-"_SMIDA=9117a9eb136353bd6956651bd59acd37; __utmt=1; __utma=29983421.1729484844.1413489369.1413625619.1413627797.3; __utmb=29983421.7.10.1413627797; __utmc=29983421; __utmz=29983421.1413489369.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)"
  
  response &lt;- GET(url, config(cookie= cook))
  
  content(x = response,as = 'text', encoding = "UTF-8")   
  </code></pre>
  
  <p>So when I use content it return me information, that I am not logged in( as I do without cookie)</p>
  
  <p>How can I solve this problem? </p>
  
  <p>Test credentials are login: <code>mytest2</code>, pass: <code>qwerty12</code>)</p>