Skip to contents

Adds an HTTP layer to a tower

Usage

add_route(tower, method = "GET", path, handler)

Arguments

tower

A tower object

method

A string containing the HTTP method to match

path

A string containing the path to match

handler

A function to call when the layer is matched

Value

A tower object with the layer added