#pragma once #include "server.h" #include #include #include 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); }; std::string extend_index_html(std::string path); std::string generate_response(http::request& req, http::response& res, Server& server);