Skip to content

Router

plumb()
Process a Plumber API
plumb_api() available_apis()
Process a Package's Plumber API
pr()
Create a new Plumber router
pr_run()
Start a server using plumber object
options_plumber() get_option_or_env()
Plumber options
is_plumber()
Determine if Plumber object

Router Methods

pr_handle() pr_get() pr_post() pr_put() pr_delete() pr_head()
Add handler to Plumber router
pr_mount()
Mount a Plumber router
pr_static()
Add a static route to the plumber object

Router Hooks

pr_hook() pr_hooks()
Register a hook
pr_cookie()
Store session data in encrypted cookies.
pr_filter()
Add a filter to Plumber router

Router Defaults

pr_set_api_spec()
Set the OpenAPI Specification
pr_set_docs()
Set the API visual documentation
pr_set_serializer()
Set the default serializer of the router
pr_set_parsers()
Set the default endpoint parsers for the router
pr_set_404()
Set the handler that is called when the incoming request can't be served
pr_set_error()
Set the error handler that is invoked if any filter or endpoint generates an error
pr_set_debug()
Set debug value to include error messages of routes cause an error
pr_set_docs_callback()
Set the callback to tell where the API visual documentation is located

Visual Documentation Interface

pr_set_api_spec()
Set the OpenAPI Specification
pr_set_docs()
Set the API visual documentation
register_docs() registered_docs()
Add visual documentation for plumber to use
validate_api_spec()
Validate OpenAPI Spec

Body Parsers

Response

Cookies and Filters

pr_cookie()
Store session data in encrypted cookies.
random_cookie_key()
Random cookie key generator
session_cookie()
Store session data in encrypted cookies.
forward()
Forward Request to The Next Handler

R6 Constructors

Plumber
Package Plumber Router
PlumberEndpoint
Plumber Endpoint
PlumberStatic
Static file router
PlumberStep
plumber step R6 class
Hookable
Hookable