audio_trans/examples/benchmark/JsonCtrl.cc

10 lines
288 B
C++
Raw Permalink Normal View History

2025-04-07 11:31:21 +08:00
#include "JsonCtrl.h"
void JsonCtrl::asyncHandleHttpRequest(
const HttpRequestPtr &,
std::function<void(const HttpResponsePtr &)> &&callback)
{
Json::Value ret;
ret["message"] = "Hello, World!";
auto resp = HttpResponse::newHttpJsonResponse(ret);
callback(resp);
}