balde  master
A microframework for C based on GLib and bad intentions.
hello-with-cookies.c

An example with HTTP cookies.

/*
* balde: A microframework for C based on GLib and bad intentions.
* Copyright (C) 2013-2017 Rafael G. Martins <rafael@rafaelmartins.eng.br>
*
* This program can be distributed under the terms of the LGPL-2 License.
* See the file COPYING.
*/
#include <balde.h>
hello(balde_app_t *app, balde_request_t *request)
{
balde_response_set_cookie(rv, "bola", "guda", 60, -1, NULL, NULL, FALSE, FALSE);
return rv;
}
int
main(int argc, char **argv)
{
balde_app_add_url_rule(app, "hello", "/", BALDE_HTTP_GET, hello);
balde_app_run(app, argc, argv);
return 0;
}