as_cookie_parser {ambiorix} | R Documentation |
Define a Cookie Parser
Description
Identifies a function as a cookie parser (see example).
Usage
as_cookie_parser(fn)
Arguments
fn |
A function that accepts a single argument,
|
Value
Object of class "cookieParser".
Examples
func <- function(req) {
req$HTTP_COOKIE
}
parser <- as_cookie_parser(func)
app <- Ambiorix$new()
app$use(parser)
[Package ambiorix version 2.2.0 Index]