From c0ccf16c69d43a89674640c61d13ec2c02b128d6 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 10 Apr 2020 15:36:59 +0200 Subject: First working plugin: static-files --- response.h | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'response.h') diff --git a/response.h b/response.h index a877944..c47a980 100644 --- a/response.h +++ b/response.h @@ -10,31 +10,8 @@ namespace beast = boost::beast; // from namespace http = beast::http; // from -class http_exception: public std::exception -{ - std::string m_message; -public: - http_exception(std::string message); - virtual const char* what() const noexcept; -}; - -class bad_request_exception: public http_exception -{ -public: - bad_request_exception(std::string message); -}; - -class not_found_exception: public http_exception -{ -public: - not_found_exception(std::string message); -}; - -class server_error_exception: public http_exception -{ -public: - server_error_exception(std::string message); -}; +typedef http::request request_type; +typedef http::response response_type; std::string extend_index_html(std::string path); -std::string generate_response(http::request& req, http::response& res, Server& server); +std::string generate_response(request_type& req, response_type& res, Server& server); -- cgit v1.2.3