mirage / ocaml-cohttp

An OCaml library for HTTP clients and servers using Lwt or Async
Other
713 stars 175 forks source link

Use connection cache instead of Net.ctx as Client.ctx #1075

Open madroach opened 4 months ago

madroach commented 4 months ago

This is a proposal to make the semantics of connection cache and Net.ctx in the Cohttp_lwt.Client module clearer. This change is essentially summarized in cohttp-lwt/src/client.mli:

 module Make (Connection : S.Connection) :
-  S.Client with type ctx = Connection.Net.ctx
+  S.Client with type ctx = S.call

This is just a proof-of-concept on how to fix #1074