Making HTTP(s) requests in OCaml usually has the following costs:
- Heavy dependency profile (Cohttp)
- C bindings/Complex API (Ocurl)
Curly is an attempt to fill the gap with something that is extremely simple and only requires the curl binary to be available. It is meant for applications where the dependency profile is the most important thing. Performance, flexibility, and async support are non considerations.
Here’s an example:
Curly.(run (Request.make ~url:"https://opam.ocaml.org" ~meth:`GET ()))