mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 03:38:03 +08:00
12 lines
346 B
C++
12 lines
346 B
C++
#include "BenchmarkCtrl.h"
|
|
void BenchmarkCtrl::asyncHandleHttpRequest(
|
|
const HttpRequestPtr &,
|
|
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);
|
|
}
|