powered by
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie for a more in-depth description of each parameter's purpose.
cookie( ..., max_age = NULL, domain = NULL, path = NULL, same_site = "Lax", secure = FALSE, http_only = FALSE, partitioned = FALSE, name = ...names(), value = ..1 )
A 'header' object that can be passed to response().
response()
A single key-value pair.
The number of seconds until expiration. Omit to create a session cookie. Inf is mapped to 34560000L (400 days).
Inf
Send with requests to this host.
Send with requests to this path.
'Strict', 'Lax', or 'None'. secure required for 'None'.
'Strict'
'Lax'
'None'
secure
Only send over HTTPS.
Disallow javascript access.
Use partitioned storage. secure required.
Explicitly set the name (key) in the key-value pair.
Explicitly set the value in the key-value pair.
library(webqueue) cookie(xyz = 123, max_age = 3600, http_only = TRUE) token <- 'randomstring123' cookie(token) response(cookie(token = 'randomstring123'))
Run the code above in your browser using DataLab