summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2020-05-31 22:31:33 -0400
committerRyan Kavanagh <rak@rak.ac>2020-05-31 22:36:28 -0400
commit4431ffd4ea72a30003ae5ccde3e3d61bf64313eb (patch)
tree78414ecfb4d15cc8230912dfad0c930d8dadbc14 /bin
parentmimetype stub (diff)
We can now make requests
Diffstat (limited to '')
-rw-r--r--bin/leda.ml23
1 files changed, 7 insertions, 16 deletions
diff --git a/bin/leda.ml b/bin/leda.ml
index 07fe43c..40074ff 100644
--- a/bin/leda.ml
+++ b/bin/leda.ml
@@ -1,20 +1,11 @@
module M = Gemini.MimeTextGemini.MimeTextGemini
-let test_gemini = "=> /blah mylink\r\n\
- => /blah\r\n\
- ```\r\n\
- preformatted 1\r\n\
- preformatted 2\r\n\
- ``` ending preformatted text\r\n\
- some text\r\n\
- more text\r\n\
- \r\n\
- * unordered list\r\n"
-
-let _ = print_endline test_gemini
-
-let _ = print_endline "\n\n...gets parsed as...\n\n"
-
let test_parse s = M.gemini_to_canon_str (M.str_to_gemini s)
-let main = print_endline (test_parse test_gemini)
+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"