2018-05-14 08:57:40 +00:00
|
|
|
#pragma once
|
|
|
|
#include <drogon/HttpSimpleController.h>
|
|
|
|
using namespace drogon;
|
2018-05-29 05:49:26 +00:00
|
|
|
namespace example{
|
|
|
|
class TestController:public drogon::HttpSimpleController<TestController>
|
|
|
|
{
|
|
|
|
public:
|
2018-08-26 08:25:35 +00:00
|
|
|
virtual void asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)>&callback)override;
|
2018-05-29 05:49:26 +00:00
|
|
|
PATH_LIST_BEGIN
|
2018-08-27 10:19:04 +00:00
|
|
|
//list path definations here;
|
|
|
|
//PATH_ADD("/path","filter1","filter2",...);
|
|
|
|
PATH_ADD("/");
|
|
|
|
PATH_ADD("/Test","nonFilter");
|
|
|
|
PATH_ADD("/tpost","drogon::PostFilter");
|
|
|
|
PATH_ADD("/slow","TimeFilter");
|
2018-05-29 05:49:26 +00:00
|
|
|
PATH_LIST_END
|
|
|
|
};
|
|
|
|
}
|