cohttpversion Documentation on ocaml.org

An OCaml library for HTTP clients and servers

Cohttp is an OCaml library for creating HTTP daemons. It has a portable HTTP parser, and implementations using various asynchronous programming libraries.

See the cohttp-async, cohttp-lwt, cohttp-lwt-unix, cohttp-lwt-jsoo and cohttp-mirage libraries for concrete implementations for particular targets.

You can implement other targets using the parser very easily. Look at the IO signature in lib/s.mli 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. Further debugging of the connection layer can be obtained by setting CONDUIT_DEBUG to any value.

AuthorsAnil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott, Rudi Grinberg, Andy Ray and Anurag Soni
LicenseISC
Published
Homepagehttps://github.com/mirage/ocaml-cohttp
Issue Trackerhttps://github.com/mirage/ocaml-cohttp/issues
Documentationhttps://mirage.github.io/ocaml-cohttp/
MaintainerAnil Madhavapeddy <anil@recoil.org>
Dependencies
Source [http] https://github.com/mirage/ocaml-cohttp/releases/download/v6.3.0/cohttp-6.3.0.tbz
sha256=31130f68a9f0a5cd8d71b55f042456e6d35bf8b7ab6a71ab6d7bd7dbdb607b24
sha512=1b14571b8aef12ae51f94eb7e94a8fc6e26b64dffedd86f8f9c237479b980395a2424ca7a9ce3dc285608bce770170688e86b4ba6da82370ca5fe7a9649cd19f
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/cohttp/cohttp.6.3.0/opam