How does netcat create an HTTP request and what does it look like

So I have some machines that are running CGMiner. I can currently communicate with them using netcat. My usage looks something like this:

 echo -n '{"command":"config"}' | nc -w 2 4028

I want to replicate this functionality in something like Postman or Python, but I am having trouble understanding what this netcat command is really doing. I realize that I am making a connection and sending a JSON string, then getting JSON back, but beyond that I am unsure what the HTTP request looks like, or if there even is an HTTP request being sent.

I think a correct answer for this question will show how I can perform this action in another tool or will show me explicitly what netcat is sending over the wire, because while my current workflow is fine, and it works easily in bash scripts, I don't like it when I don't understand what my tools are doing.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum