[ADD/WIP] Parsee IDs, -v flag

This commit is contained in:
LDA 2024-08-16 16:38:21 +02:00
commit aa9b68e02d
7 changed files with 56 additions and 13 deletions

View file

@ -29,14 +29,14 @@ ParseeRequest(HttpServerContext *ctx, void *argp)
arg.stream = stream;
Log(LOG_NOTICE, "%s %s",
Log(LOG_DEBUG, "%s %s",
HttpRequestMethodToString(HttpRequestMethodGet(ctx)),
path
);
if (!HttpRouterRoute(data->router, path, &arg, (void **) &response))
{
Log(LOG_NOTICE, "Couldn't route %s", path);
Log(LOG_DEBUG, "Couldn't route %s", path);
HttpResponseStatus(ctx, HTTP_NOT_FOUND);
JsonFree(response);
@ -56,8 +56,11 @@ ParseeRequest(HttpServerContext *ctx, void *argp)
HttpSendHeaders(ctx);
JsonEncode(response, stream, JSON_DEFAULT);
JsonFree(response);
return;
}
Log(LOG_DEBUG, "%s %s (%d)",
HttpRequestMethodToString(HttpRequestMethodGet(ctx)),
path, HttpResponseStatusGet(ctx)
);
}
HttpClientContext *