#ifndef HTTPSERVER_H #define HTTPSERVER_H #include "HttpPostData.h" #include #include #include namespace Http { class HttpServerImpl; class HttpServer { public: struct HttpReply { struct Status { enum type { Ok = 200, Created = 201, Accepted = 202, NoContent = 204, MultipleChoices = 300, MovedPermanently = 301, MovedTemporarily = 302, NotModified = 304, BadRequest = 400, Unauthorized = 401, Forbidden = 403, NotFound = 404, InternalServerError = 500, NotImplemented = 501, BadGateway = 502, ServiceUnavailable = 503 }; }; Status::type status; std::string content; }; public: typedef std::function&)> CallbackMethod; public: HttpServer(unsigned short port, CallbackMethod callback); ~HttpServer(); void Wait(); private: std::unique_ptr m_pHttpServerImpl; }; } // namespace Http #endif // HTTPSERVER_H