CoHTTP is an OCaml library for creating HTTP daemons. It has a portable HTTP parser, and implementations using various asynchronous programming libraries:
Cohttp_lwt_unixuses the Lwt library, and specifically the UNIX bindings.
Cohttp_asyncuses the Async library from Jane Street.
Cohttp_lwt_mirageuses the Mirage interface to generate standalone microkernels.
You can implement other targets using parser very easily. Look at the
lib/IO.ml signature, and implement that in the desired backend.
You can activate some runtime debugging by setting
COHTTP_DEBUG to any
value, and all requests and responses will be written to stderr.
For build requirements, please see the
_oasis file, or use OPAM to install
it from http://github.com/OCamlPro/opam