mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-11-29 18:27:43 +08:00
16 lines
401 B
C++
16 lines
401 B
C++
#pragma once
|
|
#include <drogon/HttpSimpleController.h>
|
|
using namespace drogon;
|
|
|
|
class JsonCtrl : public drogon::HttpSimpleController<JsonCtrl>
|
|
{
|
|
public:
|
|
void asyncHandleHttpRequest(
|
|
const HttpRequestPtr &req,
|
|
std::function<void(const HttpResponsePtr &)> &&callback) override;
|
|
PATH_LIST_BEGIN
|
|
// list path definitions here;
|
|
PATH_ADD("/json", Get);
|
|
PATH_LIST_END
|
|
};
|