Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Cohttp_lwt.S
SourcePortable 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.
The Net
module type defines how to connect to a remote node and close the resulting channels to clean up.
This is compatible with Mirage_time.S
. It may be satisfied by mirage-time-unix Time
or Mirage_time
.
type call =
?headers:Http.Header.t ->
?body:Body.t ->
?absolute_form:bool ->
Http.Method.t ->
Uri.t ->
(Cohttp.Response.t * Body.t) Lwt.t
call ?headers ?body method uri
Function type used to handle http requests
Leaks are detected by the GC and logged as debug messages, these can be enabled activating the debug logging. For example, this can be done as follows in cohttp-lwt-unix
Cohttp_lwt_unix.Debug.activate_debug ();
Logs.set_level (Some Logs.Warning)
The Connection
module handles a single, possibly pipelined, http connection.
A Connection_cache
handles http requests. It not necessarily caches connections.
The Client
module is a collection of convenience functions for constructing and processing requests.