drogon/examples/benchmark/BenchmarkCtrl.cc
2018-12-15 20:05:19 +08:00

9 lines
344 B
C++

#include "BenchmarkCtrl.h"
void BenchmarkCtrl::asyncHandleHttpRequest(const HttpRequestPtr& req,const std::function<void (const HttpResponsePtr &)> & callback)
{
//write your application logic here
auto resp = HttpResponse::newHttpResponse();
resp->setBody("<p>Hello, world!</p>");
resp->setExpiredTime(0);
callback(resp);
}