2018-05-30 05:23:59 +00:00
|
|
|
#include "TestViewCtl.h"
|
2018-08-26 08:25:35 +00:00
|
|
|
void TestViewCtl::asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)>&callback)
|
2018-05-30 05:23:59 +00:00
|
|
|
{
|
|
|
|
//write your application logic here
|
|
|
|
drogon::HttpViewData data;
|
|
|
|
data.insert("title",std::string("TestView"));
|
2018-05-30 13:23:46 +00:00
|
|
|
auto res=drogon::HttpResponse::newHttpViewResponse("TestView",data);
|
2018-08-26 08:25:35 +00:00
|
|
|
callback(res);
|
2018-05-30 05:23:59 +00:00
|
|
|
}
|