mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -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
|
if !debug_ || config.debug then
|
||||||
Printf.eprintf "opentelemetry: send http POST to %s (%dB)\n%!" url
|
Printf.eprintf "opentelemetry: send http POST to %s (%dB)\n%!" url
|
||||||
(String.length data);
|
(String.length data);
|
||||||
|
let headers =
|
||||||
|
("Content-Type", "application/x-protobuf") :: config.headers
|
||||||
|
in
|
||||||
match
|
match
|
||||||
Ezcurl.post ~headers:config.headers ~client ~params:[] ~url
|
Ezcurl.post ~headers ~client ~params:[] ~url ~content:(`String data) ()
|
||||||
~content:(`String data) ()
|
|
||||||
with
|
with
|
||||||
| Ok { code; _ } when code >= 200 && code < 300 -> ()
|
| Ok { code; _ } when code >= 200 && code < 300 -> ()
|
||||||
| Ok { code; body; headers = _; info = _ } ->
|
| Ok { code; body; headers = _; info = _ } ->
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue