2018-12-15 12:05:19 +00:00
|
|
|
#include "BenchmarkCtrl.h"
|
2019-05-18 12:39:57 +00:00
|
|
|
void BenchmarkCtrl::asyncHandleHttpRequest(
|
|
|
|
const HttpRequestPtr &req,
|
|
|
|
std::function<void(const HttpResponsePtr &)> &&callback)
|
2018-12-15 12:05:19 +00:00
|
|
|
{
|
2019-05-18 12:39:57 +00:00
|
|
|
// write your application logic here
|
2018-12-15 12:05:19 +00:00
|
|
|
auto resp = HttpResponse::newHttpResponse();
|
|
|
|
resp->setBody("<p>Hello, world!</p>");
|
|
|
|
resp->setExpiredTime(0);
|
|
|
|
callback(resp);
|
2019-12-23 06:08:56 +00:00
|
|
|
}
|