mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-05 05:07:58 +08:00
11 lines
371 B
C++
Executable File
11 lines
371 B
C++
Executable File
#include "TestController.h"
|
|
using namespace example;
|
|
void TestController::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);
|
|
}
|