powered by
Identifies a function as a cookie preprocessor.
as_cookie_preprocessor(fn)
Object of class "cookiePreprocessor".
A function that accepts the same arguments as the cookie method of the Response class (name, value, ...), and returns a modified value.
cookie
value
func <- function(name, value, ...) { sprintf("prefix.%s", value) } prep <- as_cookie_preprocessor(func) app <- Ambiorix$new() app$use(prep)
Run the code above in your browser using DataLab