Netcat can listen on a port and show you what arrives quite easily. It is installed on a Mac OSX as plain nc
. See documentation here and here.
Try this in a Terminal window:
man nc
And:
nc -l 80
You may need sudo
on the front of that because 80 is a privileged port.