#pragma once #include using namespace drogon; namespace api { class Attachment:public drogon::HttpApiController { public: METHOD_LIST_BEGIN //use METHOD_ADD to add your custom processing function here; METHOD_ADD(Attachment::get,"/","drogon::GetFilter"); METHOD_ADD(Attachment::upload,"/upload","drogon::PostFilter"); METHOD_LIST_END //your declaration of processing function maybe like this: void get(const HttpRequestPtr& req, const std::function&callback); void upload(const HttpRequestPtr& req, const std::function&callback); }; }