drogon/examples/simple_example/ListParaCtl.cc

14 lines
436 B
C++
Raw Normal View History

2018-05-30 10:00:02 +00:00
#include "ListParaCtl.h"
2019-05-18 12:39:57 +00:00
void ListParaCtl::asyncHandleHttpRequest(
const HttpRequestPtr &req,
std::function<void(const HttpResponsePtr &)> &&callback)
2018-05-30 10:00:02 +00:00
{
2019-05-18 12:39:57 +00:00
// write your application logic here
2018-05-30 10:00:02 +00:00
HttpViewData data;
2018-10-14 07:56:54 +00:00
data.insert("title", "list parameters");
data.insert("parameters", req->getParameters());
2019-05-18 12:39:57 +00:00
auto res =
drogon::HttpResponse::newHttpViewResponse("ListParaView.csp", data);
2018-08-26 08:25:35 +00:00
callback(res);
2018-11-16 05:26:14 +00:00
}