package cohttp

  1. Overview
  2. Docs

Portable Lwt implementation of HTTP client and server, without depending on a particular I/O implementation. The various Make functors must be instantiated by an implementation that provides a concrete IO monad.

module type IO = Cohttp.S.IO with type 'a t = 'a Lwt.t

The IO module is specialized for the Lwt monad.

module S : module type of Cohttp_lwt_s

Portable Lwt implementation of HTTP client and server, without depending on a particular I/O implementation. The various Make functors must be instantiated by an implementation that provides a concrete IO monad.

module type Client = S.Client

Aliases for module types inside S. These are deprecated and are only here for backwards comaptibility

module type Server = S.Server
module type Net = S.Net
module Request : Cohttp.S.Request with type t = Cohttp.Request.t
module Response : Cohttp.S.Response with type t = Cohttp.Response.t

The Make_client functor glues together a Cohttp.S.IO implementation to send requests down a connection that is established by the Net module. The resulting module satisfies the Client module type.

The Make_server functor glues together a Cohttp.S.IO implementation to send requests down a connection that is established by the Net module. The resulting module satisfies the Server module type.

OCaml

Innovation. Community. Security.