1
0
forked from cat/WebBase

Added the new response style and 404 page

This commit is contained in:
2025-07-04 20:02:56 +03:00
parent 8097796af4
commit 0d87542196
6 changed files with 34 additions and 48 deletions

View File

@@ -57,15 +57,16 @@ class Webserver : public std::enable_shared_from_this<Webserver> {
public:
Webserver(asio::io_context &context);
private:
void begin();
static void initResponses();
// Responses
static std::unordered_map<
std::string,
std::unordered_map<std::string, std::function<void(HTTPrequest &self)>>>
responseMethods;
private:
void begin();
static void initResponses();
asio::io_context &io;
asio::ip::tcp::acceptor accept;
};