diff options
Diffstat (limited to '')
-rw-r--r-- | bin/leda.ml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/leda.ml b/bin/leda.ml index 40074ff..8b98762 100644 --- a/bin/leda.ml +++ b/bin/leda.ml @@ -5,7 +5,11 @@ let test_parse s = M.gemini_to_canon_str (M.str_to_gemini s) module T = Gemini.MimeType.MimeType module R = Gemini.Request.GeminiTransaction(T) -let main = - match R.request "gemini://gemini.circumlunar.space/\r\n" with - | Some (_, _, s) -> print_endline s - | _ -> print_endline "oops" +let () = + Lwt_main.run begin + let req = R.string_to_request "gemini://gemini.circumlunar.space/\r\n" in + let%lwt response = R.transaction req in + match response with + | Some (_, _, s) -> Lwt_io.printl s + | _ -> Lwt_io.printl "ooops" + end |