0

How do I get the cookie's value in R-Apache?

I set the cookie in my html code using brew :

setCookie(name="ID",value=paste(sample(1:9999,1)))

My page has a form that sends post data to my R code. How would I be able to retrieve this cookie in the R code?

Thanks!

Nick Trileski
  • 151
  • 1
  • 2
  • 8

1 Answers1

0

Maybe with RApache's built-in variable: COOKIES. Short example:

setCookie(name="ID",value=paste(sample(1:9999,1)))
cat(COOKIES[["ID"]])
daroczig
  • 28,004
  • 7
  • 90
  • 124