mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-30 10:47:40 +08:00
19 lines
654 B
C++
Executable File
19 lines
654 B
C++
Executable File
#pragma once
|
|
#include <drogon/HttpSimpleController.h>
|
|
using namespace drogon;
|
|
namespace example{
|
|
class TestController:public drogon::HttpSimpleController<TestController>
|
|
{
|
|
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");
|
|
PATH_LIST_END
|
|
};
|
|
}
|