ygrek/ocurl

Async support?

sgrove opened this issue · 1 comments

Curious re:

  1. What it would take to get Async support?
  2. If it would be wise to replace Cohttp_async.Client with ocurl usage?

I need to be able to use external proxies (mirage/ocaml-cohttp#515) and would love to piggyback on libcurl with an async interface!

ygrek commented

I have no idea about Async, so very unlikely to work on it. I imagine there are several ways:

  • look at libcurl async api and corresponding wrappers in ocurl and construct Async api out of them
  • look at Curl_lwt implementation and mimic it for Async
  • use Curl_lwt directly with https://github.com/janestreet/lwt-async (idk how well it works)
  • abstract Curl_lwt over classic async monad and hope lwt/async semantic differences will not matter (preferred way)