#pragma once #include using namespace drogon; class CustomCtrl : public drogon::HttpController { public: METHOD_LIST_BEGIN //use METHOD_ADD to add your custom processing function here; METHOD_ADD(CustomCtrl::hello, "/{1}", Get, "CustomHeaderFilter"); //path is /customctrl/{arg1} METHOD_LIST_END explicit CustomCtrl(const std::string &greetings) : _greetings(greetings) {} void hello(const HttpRequestPtr &req, const std::function &callback, const std::string &userName) const; private: std::string _greetings; };