From 099a05498c005145798f0c92e9642f4ab4d05d89 Mon Sep 17 00:00:00 2001 From: Shon Feder Date: Sun, 25 May 2025 19:12:55 -0400 Subject: [PATCH] Fix client and try%lwt --- src/client-cohttp-eio/opentelemetry_client_cohttp_eio.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client-cohttp-eio/opentelemetry_client_cohttp_eio.ml b/src/client-cohttp-eio/opentelemetry_client_cohttp_eio.ml index b5d0e4ff..ae759cb8 100644 --- a/src/client-cohttp-eio/opentelemetry_client_cohttp_eio.ml +++ b/src/client-cohttp-eio/opentelemetry_client_cohttp_eio.ml @@ -86,8 +86,7 @@ module Httpc : sig val cleanup : t -> unit end = struct open Opentelemetry.Proto - open Lwt.Syntax - module Httpc = Cohttp_lwt_unix.Client + module Httpc = Cohttp_eio.Client type t = unit @@ -106,9 +105,9 @@ end = struct Header.(add headers "Content-Type" "application/x-protobuf") in - let body = Cohttp_lwt.Body.of_string bod in + let body = Cohttp_eio.Body.of_string bod in let r = - try%lwt + try let r = Httpc.post ~headers ~body uri in Ok r with e -> Error e