![]() |
MantisBase v0.4.9
|
Thread-local route registry backing the MantisBase router. More...
#include <route_registry.h>
Public Member Functions | |
| void | add (const std::string &method, const std::string &path, const MbHandlerFn &handler, const MbMiddlewares &middlewares) |
| const MbRouteHandler * | find (const std::string &method, const std::string &path) const |
| json | remove (const std::string &method, const std::string &path) |
| Remove a route from the registry. | |
| void | clear () |
Thread-local route registry backing the MantisBase router.
| void mb::MbRouteRegistry::add | ( | const std::string & | method, |
| const std::string & | path, | ||
| const MbHandlerFn & | handler, | ||
| const MbMiddlewares & | middlewares ) |
Register a handler for method + path.
|
inline |
Clear all registered routes
| const MbRouteHandler * mb::MbRouteRegistry::find | ( | const std::string & | method, |
| const std::string & | path ) const |
| json mb::MbRouteRegistry::remove | ( | const std::string & | method, |
| const std::string & | path ) |
Remove a route from the registry.