[ADD/WIP] Add some HTTP request code

We can now *register* users!
This commit is contained in:
LDA 2024-06-13 09:35:57 +02:00
commit 0fa95c2d14
12 changed files with 320 additions and 11 deletions

View file

@ -1,6 +1,7 @@
#include <Parsee.h>
#include <Cytoplasm/Memory.h>
#include <Cytoplasm/Log.h>
#include <Routes.h>
@ -17,7 +18,13 @@ ParseeInitData(void)
data->config = ParseeConfigGet();
data->router = HttpRouterCreate();
#define X_ROUTE(path, func) HttpRouterAdd(data->router, path, func);
#define X_ROUTE(path, func) do {\
if (!HttpRouterAdd(data->router, path, func))\
{\
Log(LOG_ERR, "Can't register %s", path);\
}\
}\
while (0);
ROUTES
#undef X_ROUTE
return data;