Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
const { \
return *(dispatcher->nextRoute = std::make_shared<Route>( \
HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda))) \
.get(); \
} \
Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
return *(dispatcher->nextRoute = std::make_shared<Route>( \
HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda))) \
.get(); \
}
57 { \
58 return *(dispatcher->nextRoute = std::make_shared<Route>( \
59 HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda))) \
60 .get(); \
61 } \
62 Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
63 return *(dispatcher->nextRoute = std::make_shared<Route>( \
64 HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda))) \
65 .get(); \
66 }