diff --git a/examples/async/async_get.ml b/examples/async/async_get.ml index be082e3..991eaea 100644 --- a/examples/async/async_get.ml +++ b/examples/async/async_get.ml @@ -9,7 +9,9 @@ let main port host () = Tcp.connect_sock where_to_connect >>= fun socket -> let finished = Ivar.create () in - let response_handler = Httpun_examples.Client.print ~on_eof:(Ivar.fill finished) in + let response_handler = + Httpun_examples.Client.print + ~on_eof:((Ivar.fill [@ocaml.alert "-deprecated"]) finished) in let headers = Headers.of_list [ "host", host ] in Client.create_connection socket >>= fun connection -> let request_body = diff --git a/examples/async/async_get_pipelined.ml b/examples/async/async_get_pipelined.ml index 9856b78..2f7c582 100644 --- a/examples/async/async_get_pipelined.ml +++ b/examples/async/async_get_pipelined.ml @@ -11,7 +11,9 @@ let main port host () = Tcp.connect_sock where_to_connect >>= fun socket -> let finished = Ivar.create () in - let response_handler = Httpun_examples.Client.print ~on_eof:(Ivar.fill finished) in + let response_handler = + Httpun_examples.Client.print + ~on_eof:((Ivar.fill [@ocaml.alert "-deprecated"]) finished) in let request_headers = Request.create ~headers:(Headers.of_list [ "host", host ]) `GET "/" in @@ -25,7 +27,7 @@ let main port host () = in let finished' = Ivar.create () in let response_handler' = - Httpun_examples.Client.print ~on_eof:(Ivar.fill finished') + Httpun_examples.Client.print ~on_eof:((Ivar.fill [@ocaml.alert "-deprecated"]) finished') in let request_body' = Client.request diff --git a/examples/async/async_https_get.ml b/examples/async/async_https_get.ml index a567d84..bf40f6d 100644 --- a/examples/async/async_https_get.ml +++ b/examples/async/async_https_get.ml @@ -10,7 +10,7 @@ let response_handler finished response response_body = let rec on_read bs ~off ~len = Bigstring.to_string ~pos:off ~len bs |> print_endline; Body.Reader.schedule_read response_body ~on_read ~on_eof - and on_eof () = Ivar.fill finished () in + and on_eof () = (Ivar.fill [@ocaml.alert "-deprecated"]) finished () in Body.Reader.schedule_read response_body ~on_read ~on_eof; | response -> Format.fprintf Format.std_formatter "%a\n%!" Response.pp_hum response; diff --git a/examples/async/async_post.ml b/examples/async/async_post.ml index b17c20c..21c075b 100644 --- a/examples/async/async_post.ml +++ b/examples/async/async_post.ml @@ -9,7 +9,9 @@ let main port host () = Tcp.connect_sock where_to_connect >>= fun socket -> let finished = Ivar.create () in - let response_handler = Httpun_examples.Client.print ~on_eof:(Ivar.fill finished) in + let response_handler = + Httpun_examples.Client.print + ~on_eof:((Ivar.fill [@alert "-deprecated"]) finished) in let headers = Headers.of_list [ "transfer-encoding", "chunked" @@ -29,7 +31,7 @@ let main port host () = don't_wait_for ( Reader.read_one_chunk_at_a_time stdin ~handle_chunk:(fun bs ~pos:off ~len -> Body.Writer.write_bigstring request_body bs ~off ~len; - Body.Writer.flush request_body (fun () -> ()); + Body.Writer.flush request_body (fun _reason -> ()); return (`Consumed(len, `Need_unknown))) >>| function | `Eof_with_unconsumed_data s -> Body.Writer.write_string request_body s;