acl/app/wizard/tmpl/http/http_servlet.h

57 lines
1.2 KiB
C
Raw Normal View History

#pragma once
2014-11-19 00:25:21 +08:00
class http_servlet : public acl::HttpServlet
{
public:
http_servlet(http_handlers_t*, acl::socket_stream*, acl::session*);
2019-07-20 16:41:23 +08:00
~http_servlet(void);
2014-11-19 00:25:21 +08:00
protected:
// @override
bool doGet(HttpRequest&, HttpResponse&);
// @override
bool doPost(HttpRequest&, HttpResponse&);
// override
bool doHead(HttpRequest& req, HttpResponse& res);
// override
bool doPut(HttpRequest& req, HttpResponse& res);
// override
bool doPatch(HttpRequest& req, HttpResponse& res);
// override
bool doConnect(HttpRequest& req, HttpResponse& res);
// override
bool doPurge(HttpRequest& req, HttpResponse& res);
// override
bool doDelete(HttpRequest& req, HttpResponse& res);
// override
bool doOptions(HttpRequest& req, HttpResponse& res);
// override
bool doProfind(HttpRequest& req, HttpResponse& res);
// override
bool doWebsocket(HttpRequest& req, HttpResponse& res);
// override
bool doUnknown(HttpRequest& req, HttpResponse& res);
// @override
bool doError(HttpRequest&, HttpResponse&);
// @override
bool doOther(HttpRequest&, HttpResponse&, const char* method);
private:
http_handlers_t* handlers_;
bool doService(int type, HttpRequest& req, HttpResponse& res);
2014-11-19 00:25:21 +08:00
};