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.

Value

Object of class "cookiePreprocessor".

Examples

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

prep <- as_cookie_preprocessor(func)

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


ambiorix documentation built on April 3, 2025, 9:34 p.m.