In Windows cURL I can post a web request similar to this:
curl --dump-header cook.txt ^
--data \"RURL=http=//www.example.com/r&user=bob&password=hell
Here is a way to create a post request, keep and reuse the resulting cookies with RCurl
, for example to get web pages when authentication is required :
library(RCurl)
curl <- getCurlHandle()
curlSetOpt(cookiejar="/tmp/cookies.txt", curl=curl)
postForm("http://example.com/login", login="mylogin", passwd="mypasswd", curl=curl)
getURL("http://example.com/anotherpage", curl=curl)