An example with HTTP forms. It depends on more files. Take a look at it on the balde source code.
#include "templates/hello.h"
#include "templates/form.h"
{
if (request->
method == BALDE_HTTP_POST) {
name != NULL && name[0] != '\0' ? name : "World");
balde_template_hello(app, request, response);
}
else
balde_template_form(app, request, response);
return response;
}
int
main(int argc, char **argv)
{
hello);
return 0;
}