curly

Curly is a brain dead wrapper around the curl command line utility
README

Curly is a brain dead wrapper around the curl command line utility designed to
provide a 0 dependency solution for applications that want to create some very
simple HTTP requests. It is not blazing fast, or async, but at least it involves
no C bindings, it's trivial to vendor, and the API can be learned in 5 minutes.

Here's a simple example:


match Curly.(run (Request.make ~url:"https://opam.ocaml.org" ~meth:`GET ())) with
| Ok x ->
  Format.printf "status: %d\n" x.Curly.Response.code;
  Format.printf "headers: %a\n" Curly.Header.pp x.Curly.Response.headers;
  Format.printf "body: %s\n" x.Curly.Response.body
| Error e ->
  Format.printf "Failed: %a" Curly.Error.pp e

There's not much more to it than this. Consult curly.mli to see how to construct
various requests and read responses,
or read the online documentation.

Install
Published
09 Sep 2020
Sources
curly-0.2.0.tbz
sha256=d350f5fb4dc2ab12eb3e805b356a5228ecc00497fadc38502c0d6445676e781f
sha512=ae5a704e6849d60739203f7704ae0fb62408f171cfc910db5f2bfa62ae4be13edcec938387ee6a3680eebe3442c08b08b024fd4d65dbcb5bacb040cf43c69468
Dependencies
odoc
with-doc
cohttp-lwt-unix
with-test & != "3.0.0"
alcotest
with-test
ocaml
>= "4.02.3"
dune
>= "2.4"
Reverse Dependencies
dune-release
>= "1.4.0"