So, I have an esp8266 sending JSON via http to Home Assistant running on my Raspberry PI. I needed to make sure that I was receiving the message I thought I was sending. I’m sure this is nothing to you more advanced Linux users out there :), but tcpdump came in handy for monitoring http traffic. At the command line of the raspberry pi and after installing tcpdump, I ran this line to monitor http messages:
sudo tcpdump -A -s 0 'tcp port 8123 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
Found this snippet of code here
Hope this helps someone.