7#include <boost/beast/http/verb.hpp>
8#include <boost/beast/http/empty_body.hpp>
11#include <unordered_map>
23 class Router :
public std::enable_shared_from_this<Router>
26 Router(std::shared_ptr<const StandardResponseProvider> standardResponseProvider);
34 void addRoutes(std::unordered_multimap<boost::beast::http::verb, ProtoRoute>&& routes);
44 std::unique_ptr<Implementation>
impl_;
This class extends the boost::beast::http::request<BodyT> with additional convenience.
Definition request.hpp:52
The route routes http requests to their respective handler functions.
Definition router.hpp:24
void addRoutes(std::unordered_multimap< boost::beast::http::verb, ProtoRoute > &&routes)
Add new routes to this router.
Definition router.cpp:65
std::unique_ptr< Implementation > impl_
Definition router.hpp:44
void followRoute(Session &, Request< boost::beast::http::empty_body > request)
Find a follow route. Automatically responds with 404 when now route can be found.
Definition router.cpp:79
ROAR_PIMPL_SPECIAL_FUNCTIONS(Router)
Definition session.hpp:41
Definition authorization.hpp:10