title: Get and set cookies in rvest
body: <p>How can I check my session cookies and specify those cookies before making a subsequent web request? </p>
  
  <p>I want to scrape a page but I cannot submit the cookies.</p>
  
  <p>I'm using the rvest library.</p>
  
  <p>My code:</p>
  
  <pre><code>library(rvest)
  WP &lt;- html_session("http://www.wp.pl/")
  headers &lt;- httr::headers(WP)
  cookies &lt;- unlist(headers[names(headers) == "set-cookie"])
  crumbs &lt;- stringr::str_split_fixed(cookies, "; ", 4)
  # method 1
  stringr::str_split_fixed(crumbs[, 1], "=", 2)
  # method 2
  cookies(WP)
  </code></pre>
  
  <p>How do I set my cookies to do the web scraping?</p>