Very cool. I put together something similar a little while ago that just uses curl instead of nc:
18 karma · joined December 28, 2018
Edit: One nice thing about the https interface is that you get an encrypted channel. Maybe SSH would be another option for transport. That would also make passing keys easier.
It would probably also make more sense if I were to add some kind of buffering or storage in the future.
I also toyed around with using the "-T." curl argument instead of "-T-" to allow some response in this case, but I came up against a known issue in curl (https://github.com/curl/curl/issues/932). I'm sure this wasn't the intended use case though.
It is definitely worth exploring further.