I'm using the following code because the wss scheme doesn't seem to be supported by ocaml-conduit. I found the code for the Resolver_lwt.resolve_uri line in the tests subdirectory so I've been assuming it's proper usage.
let uri = Uri.of_string "wss://echo.websocket.org" in
Resolver_lwt.resolve_uri ~uri Resolver_lwt_unix.system
The result is a Conduit.endp of value ``Unknown "unknown scheme"` on my machine. Later, when I do this and it fails:
Conduit_lwt_unix.endp_to_client
~ctx:Conduit_lwt_unix.default_ctx (`Unknown "unknown scheme");;
Exception: Failure "resolution failed: unknown scheme".
Is this a problem with my usage, with ocaml-conduit, with ocaml-websocket, or is it something else?
The workaround I'm using consists in replacing wss by https in the URI as follows:
let orig_uri = Uri.of_string ws_url in
let uri = Uri.with_scheme orig_uri (Some "https") in
...
I'm using the following code because the
wssscheme doesn't seem to be supported by ocaml-conduit. I found the code for theResolver_lwt.resolve_uriline in thetestssubdirectory so I've been assuming it's proper usage.The result is a
Conduit.endpof value ``Unknown "unknown scheme"` on my machine. Later, when I do this and it fails:Is this a problem with my usage, with ocaml-conduit, with ocaml-websocket, or is it something else?
The workaround I'm using consists in replacing
wssbyhttpsin the URI as follows: