diff options
author | Ryan Kavanagh <rak@rak.ac> | 2020-06-02 12:10:14 -0400 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2020-06-07 11:39:58 -0400 |
commit | 6fcb6e0f2fd4b93d094c68e844e7c1d0bd58a894 (patch) | |
tree | 985a8055db77097ec343304d63b4a5da2bbe0f84 | |
parent | Rename request to geminiTransaction (diff) |
string_to_request -> make_request
-rw-r--r-- | bin/leda.ml | 2 | ||||
-rw-r--r-- | gemini/geminiTransaction.ml | 4 | ||||
-rw-r--r-- | gemini/geminiTransaction.mli | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bin/leda.ml b/bin/leda.ml index 8c20e4b..1438796 100644 --- a/bin/leda.ml +++ b/bin/leda.ml @@ -7,7 +7,7 @@ module R = Gemini.GeminiTransaction.GeminiTransaction(T) let () = Lwt_main.run begin - let req = R.string_to_request "gemini://gemini.circumlunar.space/\r\n" in + let req = R.make_request ~url:"gemini://gemini.circumlunar.space/\r\n" in let%lwt response = R.transaction req in match response with | Some (_, _, s) -> Lwt_io.printl s diff --git a/gemini/geminiTransaction.ml b/gemini/geminiTransaction.ml index 282d6e7..e79e40d 100644 --- a/gemini/geminiTransaction.ml +++ b/gemini/geminiTransaction.ml @@ -31,7 +31,7 @@ sig type response = status * mime_type * string - val string_to_request : string -> request + val make_request : url:string -> request val int_to_status : int -> status option @@ -74,7 +74,7 @@ struct type response = status * mime_type * string - let string_to_request r = + let make_request ~url:r = let url = Uri.of_string r in let () = match Uri.scheme url with | Some "gemini" -> () diff --git a/gemini/geminiTransaction.mli b/gemini/geminiTransaction.mli index 45049f1..f365f71 100644 --- a/gemini/geminiTransaction.mli +++ b/gemini/geminiTransaction.mli @@ -31,7 +31,7 @@ sig type response = status * mime_type * string - val string_to_request : string -> request + val make_request : url:string -> request val int_to_status : int -> status option |