Hello,
we just released to the opam-repository the http-lwt-client
package, which consists of both a library doing HTTP requests and a binary (hurl
) that does HTTP requests.
The code is based on HTTP/AF and H2, and uses tls for HTTPS connections. Both HTTP/1(.1) and HTTP/2 protocols are supported. The motivation behind this package is to have a http client that has a reasonably small dependency cone, is purely implemented in OCaml, and uses the asynchronous task library lwt.
This package uses happy-eyeballs to connect to a remote host via IPv4 and IPv6, as proposed by IETF RFC 8305: on any computer with either IPv4 or IPv6 connectivity, a remote IPv6 or IPv4 server will be connected. Preference is given to IPv6.
If a https url is provided, the server certificate is verified using the ca-certs package.
If you experience any issues or have further needs for this package, please report an issue on the GitHub issue tracker.
The installation is just an opam install http-lwt-client
away