mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 17:30:53 +08:00
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
#pragma once
|
|
|
|
class http_service;
|
|
|
|
class http_servlet : public acl::HttpServlet
|
|
{
|
|
public:
|
|
http_servlet(http_service& service, acl::socket_stream* conn,
|
|
acl::session* session);
|
|
~http_servlet(void);
|
|
|
|
protected:
|
|
// @override
|
|
bool doGet(HttpRequest& req, HttpResponse& res);
|
|
|
|
// @override
|
|
bool doPost(HttpRequest& req, HttpResponse& res);
|
|
|
|
// @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 doPropfind(HttpRequest& req, HttpResponse& res);
|
|
|
|
// @override
|
|
bool doWebSocket(HttpRequest& req, HttpResponse& res);
|
|
|
|
// @override
|
|
bool doUnknown(HttpRequest& req, HttpResponse& res);
|
|
|
|
// @override
|
|
bool doError(HttpRequest& req, HttpResponse& res);
|
|
|
|
// @override
|
|
bool doOther(HttpRequest&, HttpResponse& res, const char* method);
|
|
|
|
private:
|
|
http_service& service_;
|
|
|
|
bool doService(int type, HttpRequest& req, HttpResponse& res);
|
|
};
|