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>
|
|
|
|
{
|
2018-10-20 05:45:17 +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");
|
|
|
|
PATH_ADD("/tpost", "drogon::PostFilter");
|
|
|
|
PATH_ADD("/slow", "TimeFilter", Get);
|
|
|
|
PATH_LIST_END
|
2018-10-14 07:56:54 +00:00
|
|
|
};
|
|
|
|
} // namespace example
|