libhttpd is designed to be a very small, lightweight and simple library that allows developers to add a web server to their project.
I started work on this library to aid the development of my home automation system. Rather than write a number of CGI scripts that would in turn communicate with my various sub-systems (using sockets or IPC), I decided that it may be easier to build a single large service. This also lowers the dependencies required to deploy my system, no Apache or other web server with support for CGI - just a single binary.
To use libhttpd, you simply need to call a 'setup' function, and hand it a callback function. When a browser (or anything talking HTTP) connects, libhttpd starts a new thread, parses the request, and calls your callback. In your callback, you can easily determine the URI requested, the method, and access any HTTP headers that were sent. You then build the response, and return from the callback. After your callback has completed, libhttpd will build the response (including any headers you added), and the thread terminates.