diff options
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/httpserver.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/zencore/include/zencore/httpserver.h b/zencore/include/zencore/httpserver.h index 2f566b858..d07eba339 100644 --- a/zencore/include/zencore/httpserver.h +++ b/zencore/include/zencore/httpserver.h @@ -2,16 +2,18 @@ #pragma once +#include "zencore.h" + #include <zencore/enumflags.h> #include <zencore/refcount.h> #include <zencore/string.h> + #include <functional> #include <gsl/gsl-lite.hpp> #include <list> #include <regex> #include <span> #include <unordered_map> -#include "zencore.h" namespace zen { @@ -259,6 +261,13 @@ private: uint32_t m_ErrorCode; }; +/** + * Base class for implementing an HTTP "service" + * + * A service exposes one or more endpoints with a certain URI prefix + * + */ + class HttpService { public: @@ -278,6 +287,9 @@ private: }; /** HTTP server + * + * Implements the main event loop to service HTTP requests, and handles routing + * requests to the appropriate endpoint handler as registered via AddEndpoint */ class HttpServer { @@ -327,6 +339,13 @@ HttpRouterRequest::GetCapture(int Index) const ////////////////////////////////////////////////////////////////////////// +/** HTTP request router helper + * + * This helper class allows a service implementer to register one or more + * endpoints using pattern matching (currently using regex matching) + * + */ + class HttpRequestRouter { public: |