2019-01-31 02:23:12 +00:00
|
|
|
#include "JsonCtrl.h"
|
2019-05-18 12:39:57 +00:00
|
|
|
void JsonCtrl::asyncHandleHttpRequest(
|
|
|
|
const HttpRequestPtr &req,
|
|
|
|
std::function<void(const HttpResponsePtr &)> &&callback)
|
2019-01-31 02:23:12 +00:00
|
|
|
{
|
|
|
|
Json::Value ret;
|
|
|
|
ret["message"] = "Hello, World!";
|
|
|
|
auto resp = HttpResponse::newHttpJsonResponse(ret);
|
|
|
|
callback(resp);
|
|
|
|
}
|