drogon/examples/simple_example/TestController.h

24 lines
682 B
C
Raw Normal View History

2018-05-14 08:57:40 +00:00
#pragma once
#include <drogon/HttpSimpleController.h>
using namespace drogon;
2018-10-14 07:56:54 +00:00
namespace example
{
class TestController : public drogon::HttpSimpleController<TestController>
{
2019-01-02 10:49:37 +00:00
public:
virtual void asyncHandleHttpRequest(const HttpRequestPtr &req, const std::function<void(const HttpResponsePtr &)> &callback) override;
PATH_LIST_BEGIN
//list path definations here;
//PATH_ADD("/path","filter1","filter2",...);
PATH_ADD("/");
PATH_ADD("/Test", "nonFilter");
2019-01-16 02:03:11 +00:00
PATH_ADD("/tpost", Post);
2019-01-02 10:49:37 +00:00
PATH_ADD("/slow", "TimeFilter", Get);
PATH_LIST_END
2019-01-25 08:46:20 +00:00
TestController()
{
LOG_DEBUG << "TestController constructor";
}
2018-10-14 07:56:54 +00:00
};
} // namespace example