Add get function to tree, and implement basic tree in router

This commit is contained in:
Pablu23
2024-11-13 13:23:56 +01:00
parent e0d1ac42f7
commit 1797b3c0ef
6 changed files with 116 additions and 137 deletions

View File

@@ -27,10 +27,12 @@ class Tree {
private:
std::shared_ptr<Node> m_root;
std::string m_method;
size_t depth;
size_t m_depth;
public:
Tree(std::string method);
void AddPath(std::string, std::function<void(Request, Response *)>);
std::optional<std::function<void(Request, Response *)>> Get(std::string);
void DebugPrint();
};
} // namespace http