From 4175da366830c0ef3bf40ddb1e6594ac5dbe3866 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Fri, 10 May 2024 15:04:43 -0500 Subject: Initial commit --- bin/dune | 4 ++++ bin/main.ml | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100644 bin/dune create mode 100644 bin/main.ml (limited to 'bin') diff --git a/bin/dune b/bin/dune new file mode 100644 index 0000000..cf3fbf4 --- /dev/null +++ b/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name apbox) + (name main) + (libraries apbox cohttp-eio)) diff --git a/bin/main.ml b/bin/main.ml new file mode 100644 index 0000000..44d41a2 --- /dev/null +++ b/bin/main.ml @@ -0,0 +1,6 @@ +open Cohttp_eio + +let () = + Eio_main.run @@ fun env -> + let res = Client.get env ~host:"www.example.org" "/" in + print_string @@ Client.read_fixed res -- cgit v1.2.3