Edit:
Example from the documentation:
r <- GET("http://httpbin.org/cookies", set_cookies(a = 1, b = 2))
I would expect that the Cookies to be i the request headers:
r$request$headers
Accept
"application/json, text/xml, application/xml, */*"
Long Version:
I do a get request in R:
library(httr)
library(magrittr)
url <- "https://www.r-bloggers.com"
r <- url %>% GET
And collect the cookies being used:
ck <- cookies(r)$value
names(ck) <- cookies(r)$name
Next i set the cookies:
#url <- "https://www.r-bloggers.com" same page or
url <- "https://www.r-bloggers.com/econometrics-postdoc-and-computational-statistics-postdoc-openings-here-in-the-stan-group-at-columbia/"
req <- url %>% GET(set_cookies(.cookies = ck))
and then i would expect that i sent the cookies with the headers.
req$request$headers
I would expect the cookies being in the request header, because of this: How are cookies passed in the HTTP protocol?.
And i assume these are my request headers req$request$headers
.