TCP is the way that you send information, HTTP is what it means.
The difference, in your case, is the port. You can’t CAN have TCP and UDP on the same port, but you can’t have the same protocol on the same port.
edit: I didn’t knew you could have different transfer protocols on the same port, ty!
IIRC if you pipe something do head it will stop reading after some lines and close the pipe, leading to a pipe fail even if everything works correctly