as_cookie_preprocessor: Define a Cookie Preprocessor

View source: R/cookie.R

as_cookie_preprocessorR Documentation

Description

Identifies a function as a cookie preprocessor.

Usage

as_cookie_preprocessor(fn)

Arguments

fn

A function that accepts the same arguments as the cookie method of the Response class (name, value, ...), and returns a modified value.

Examples

func <- function(name, value, ...) {
 sprintf("prefix.%s", value)
}

prep <- as_cookie_preprocessor(func)

app <- Ambiorix$new()
app$use(prep)


JohnCoene/ambiorix documentation built on March 5, 2025, 5:35 a.m.