Skip to contents

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

Usage

add_http_layer(tower, 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.

Value

The tower with the added layer