Something went wrong. Try again.
all the weird stuff goes here
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748open! Core
module Protocol = struct module HTTPS = struct type t = | DELETE | GET | POST
let to_string = function | DELETE -> "DELETE" | GET -> "GET" | POST -> "POST" ;;
let of_string = function | "DELETE" -> Some DELETE | "GET" -> Some GET | "POST" -> Some POST | _ -> None ;; end
type t = | HTTPS | IMAP | SMTP | WSS
let to_string = function | HTTPS -> "https" | IMAP -> "imap" | SMTP -> "smtp" | WSS -> "wss" ;;
let of_uri uri = match Uri.scheme uri with | Some "https" -> Some HTTPS | Some "imap" -> Some IMAP | Some "smtp" -> Some SMTP | Some "wss" -> Some WSS | _ -> None ;;
let of_string str = of_uri (Uri.of_string str)end