How to add "Content-Length" HTTP header to [[inputs.http]] POST method?

Hello, I’m trying to setup a telegraf instance to query a piece of equipment called Mastertroinc that performs automated water testing for aquariums. I was able to figure out part of their API and the call that I need to perform is a POST request with a plain JSON body.
The equipment keeps returning an error 500 when I send the POST from telegraf but works OK when I do that with my browser using a basic HTML form.
After comparing the traffic using wireshark, the only difference I see is that the telegraf POST does not include the “Content-Length” header, even if I hardcode the value and add it to the headers parameter in the telegraf.conf file.
Does anyone know how to enable the “Content-Length” header or at least prevent telegraf from ignoring it when I hardcode it in the conf file?
Thank you very much!

(if the body contains anything else than JSON, the equipment returns an error 500).
I setup my telegraf.conf to perform a post and added the required JSON to the body parameter but when I execute it, the response I see in the log is
[inputs.http] Error in plugin: [url=http://192.168.1.69/api/action_list]: received status code 500 (Internal Server Error), expected any value out of [200] stdout
I’m not sure if the POST request is being sent with no body or if my JSON code in the body is misconstructed.

Does anyone know how can I see the POST query that telegraf is sending or any other way to debug this issue?
Thanks in advance.

For reference, here are the relevant parameters in my telegraf.conf file
[[inputs.http]]
urls = [“http://192.168.1.69/api/action_list”]
method = “POST”
body = “{“action”:“HISTORY”,“data”:{“range”:“1440”},“type”:“read”}”

Additional information:
Looks like the [[inputs.http]] plugin splits the HTTP POST request into multiple frames using Transfer-Encoding: chunked.
Just as a test, I tried [[inputs.http_response]] with method = “POST” and the same body. This plugin sends the request in a single frame and calculates and adds an appropriate Content-Length header.
The device I’m querying responds OK but the plugin does not collect the body of the response since it is not designed to do that.
So now I’m trying to figure out how to use [[inputs.http]] in a way that the POST request is sent in a single frame instead of chunked.
Any advice will be greatly appreciated.

did you try inputs.http_response ?