mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-04 20:57:50 +08:00
8 lines
287 B
C++
8 lines
287 B
C++
|
#include "JsonCtrl.h"
|
||
|
void JsonCtrl::asyncHandleHttpRequest(const HttpRequestPtr &req, const std::function<void(const HttpResponsePtr &)> &callback)
|
||
|
{
|
||
|
Json::Value ret;
|
||
|
ret["message"] = "Hello, World!";
|
||
|
auto resp = HttpResponse::newHttpJsonResponse(ret);
|
||
|
callback(resp);
|
||
|
}
|