Module Cohttp_lwt

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
module Body : module type of Cohttp_lwt_body
module type Client = S.Client
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
module Make_client : functor (IO : Cohttp_lwt_s.IO) -> functor (Net : Cohttp_lwt_s.Net with module IO = IO) -> Cohttp_lwt_s.Client with type ctx = Net.ctx

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

module Make_server : functor (IO : Cohttp_lwt_s.IO) -> Cohttp_lwt_s.Server with module IO = IO

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