I need to send a simple cookie using RCurl.
The cookie is “AcceptDisclaimer=yes”
I tried doing this:
curl <- getCurlHandle()
curlSetOpt(cookiejar='cookies.txt', curl=curl)
resultingWebPage <- postForm(website, x = result, curl = curl)
cookies.txt contains AcceptDisclaimer=yes
However, RCurl doesn’t seem to send the cookie !
Regards !
Use of
cookiefilewill load the cookie stored in the file.Use of
cookiejarwill use a temporary cookiecalling
rm(curl)andgc()will remove the curl session and cause the cookie file to be written to disk.