diff options
Diffstat (limited to 'response.h')
-rw-r--r-- | response.h | 29 |
1 files changed, 3 insertions, 26 deletions
@@ -10,31 +10,8 @@ namespace beast = boost::beast; // from <boost/beast.hpp> namespace http = beast::http; // from <boost/beast/http.hpp> -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<http::string_body> request_type; +typedef http::response<http::string_body> response_type; std::string extend_index_html(std::string path); -std::string generate_response(http::request<http::string_body>& req, http::response<http::string_body>& res, Server& server); +std::string generate_response(request_type& req, response_type& res, Server& server); |