[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

17
src/MatrixError.c Normal file
View file

@ -0,0 +1,17 @@
#include <Matrix.h>
HashMap *
MatrixCreateError(char *err, char *msg)
{
HashMap *map;
if (!err || !msg)
{
return NULL;
}
map = HashMapCreate();
HashMapSet(map, "errcode", JsonValueString(err));
HashMapSet(map, "error", JsonValueString(msg));
return map;
}