mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
fix: use the proper content-type header for ezcurl
This commit is contained in:
parent
6e198207dc
commit
5c45589882
1 changed files with 4 additions and 2 deletions
|
|
@ -118,9 +118,11 @@ end = struct
|
|||
if !debug_ || config.debug then
|
||||
Printf.eprintf "opentelemetry: send http POST to %s (%dB)\n%!" url
|
||||
(String.length data);
|
||||
let headers =
|
||||
("Content-Type", "application/x-protobuf") :: config.headers
|
||||
in
|
||||
match
|
||||
Ezcurl.post ~headers:config.headers ~client ~params:[] ~url
|
||||
~content:(`String data) ()
|
||||
Ezcurl.post ~headers ~client ~params:[] ~url ~content:(`String data) ()
|
||||
with
|
||||
| Ok { code; _ } when code >= 200 && code < 300 -> ()
|
||||
| Ok { code; body; headers = _; info = _ } ->
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue