Learn R Programming

tower (version 0.2.0)

add_http_layer: Add an HTTP layer to a tower

Description

Add an HTTP layer to a tower. This layer will be called before the 'shiny' app's httpHandler.

Usage

add_http_layer(tower, layer)

Value

The tower with the added layer

Arguments

tower

A tower

layer

A function that takes a request and returns either a response. A layer can short circuit by returning a response directly or call the next layer will req$NEXT(req) which will call the next layer in the middleware.