aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/dune4
-rw-r--r--bin/main.ml6
2 files changed, 10 insertions, 0 deletions
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