2019-01-31 02:23:12 +00:00
|
|
|
#pragma once
|
|
|
|
#include <drogon/HttpSimpleController.h>
|
|
|
|
using namespace drogon;
|
|
|
|
class JsonCtrl : public drogon::HttpSimpleController<JsonCtrl>
|
|
|
|
{
|
|
|
|
public:
|
2019-05-18 12:39:57 +00:00
|
|
|
virtual void asyncHandleHttpRequest(
|
|
|
|
const HttpRequestPtr &req,
|
|
|
|
std::function<void(const HttpResponsePtr &)> &&callback) override;
|
2019-01-31 02:23:12 +00:00
|
|
|
PATH_LIST_BEGIN
|
2019-05-18 12:39:57 +00:00
|
|
|
// list path definitions here;
|
2019-01-31 02:23:12 +00:00
|
|
|
PATH_ADD("/json", Get);
|
|
|
|
PATH_LIST_END
|
|
|
|
};
|