determine_route: Determine the correct route to use based on a list of routes...

Description Usage Arguments Value

View source: R/routes.r

Description

For example, list('/ping' = function(params, query) 'Hello world!', function(params, query) 'Invalid route.')) refers to a /ping route and a default route 'Invalid route.'

Usage

1
determine_route(routes, request_path)

Arguments

routes

list. A named list of routes.

request_path

character. The path to which the request was sent.

Value

the correct route drawn from the routes list


dvanderbeek/microserver-test documentation built on May 21, 2019, 8:37 a.m.