diff --git a/cohttp-async/bin/cohttp_curl_async.ml b/cohttp-async/bin/cohttp_curl_async.ml index 3d2125b0a8..526254ea75 100644 --- a/cohttp-async/bin/cohttp_curl_async.ml +++ b/cohttp-async/bin/cohttp_curl_async.ml @@ -39,7 +39,7 @@ let _ = Logs.set_level @@ Some Logs.Debug; Logs.set_reporter (Logs_fmt.reporter ()); let open Command.Spec in - Command.async ~summary:"Fetch URL and print it" + Command.async_spec ~summary:"Fetch URL and print it" (empty +> anon ("url" %: string) +> flag "-X" (optional_with_default "GET" string) diff --git a/cohttp-async/bin/cohttp_server_async.ml b/cohttp-async/bin/cohttp_server_async.ml index 4d1cab4f29..8e808ad940 100644 --- a/cohttp-async/bin/cohttp_server_async.ml +++ b/cohttp-async/bin/cohttp_server_async.ml @@ -120,14 +120,14 @@ let start_server docroot port index cert_file key_file verbose () = Logs.err (fun f -> f "Error from %s" (Socket.Address.to_string addr)); Logs.err (fun f -> f "%s" @@ Exn.to_string exn))) ~mode - (Tcp.on_port port) + (Tcp.Where_to_listen.of_port port) (handler ~info ~docroot ~index) >>= fun _serv -> Deferred.never () let () = let open Command in run @@ - async ~summary:"Serve the local directory contents via HTTP or HTTPS" + async_spec ~summary:"Serve the local directory contents via HTTP or HTTPS" Spec.( empty +> anon (maybe_with_default "." ("docroot" %: string))