roar
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
Roar::Router Class Reference

The route routes http requests to their respective handler functions. More...

#include <router.hpp>

Collaboration diagram for Roar::Router:

Classes

struct  Implementation
 

Public Member Functions

 Router (std::shared_ptr< const StandardResponseProvider > standardResponseProvider)
 
 ROAR_PIMPL_SPECIAL_FUNCTIONS (Router)
 
void addRoutes (std::unordered_multimap< boost::beast::http::verb, ProtoRoute > &&routes)
 Add new routes to this router.
 
void followRoute (Session &, Request< boost::beast::http::empty_body > request)
 Find a follow route. Automatically responds with 404 when now route can be found.
 

Private Attributes

std::unique_ptr< Implementationimpl_
 

Detailed Description

The route routes http requests to their respective handler functions.

Constructor & Destructor Documentation

◆ Router()

Roar::Router::Router ( std::shared_ptr< const StandardResponseProvider standardResponseProvider)

Member Function Documentation

◆ addRoutes()

void Roar::Router::addRoutes ( std::unordered_multimap< boost::beast::http::verb, ProtoRoute > &&  routes)

Add new routes to this router.

Parameters
routesA map of verbs->routes.

◆ followRoute()

void Roar::Router::followRoute ( Session session,
Request< boost::beast::http::empty_body >  request 
)

Find a follow route. Automatically responds with 404 when now route can be found.

Parameters
requestA http request object.

◆ ROAR_PIMPL_SPECIAL_FUNCTIONS()

Roar::Router::ROAR_PIMPL_SPECIAL_FUNCTIONS ( Router  )

Member Data Documentation

◆ impl_

std::unique_ptr<Implementation> Roar::Router::impl_
private

The documentation for this class was generated from the following files: