Another way to do it is like this and works perfectly
(cat payload; cat) | nc 127.0.0.1 8001
Replace the IP and port to your requirements