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 or NULL. NULL indicates that the layer did not short-circuit the request, therefore the next layer should be called. If a response is returned, the request is short-circuited and the response is returned to the client.

Value

The tower with the layer added