httpflow: how to view raw traffic
Since both MarsEdit and NetNewsWire make HTTP requests, I often have a need to see what the raw HTTP traffic looks like.
There are different ways to do this, but what I do is type httpflow
on the command line, then type my password, and then watch the traffic.
httpflow
on my machine is an alias—a command-line command alias, not a traditional Mac OS file alias—for the following command: sudo /usr/local/bin/tcpflow -c port 80
You’ll need tcpflow to make it work. Tcpflow isn’t a standard part of OS X—but you can get a copy from Marc Liyanage. (That’s the version I myself use.)
Sometimes I only need just a quick peek at the headers (for a feed, usually) to see if it’s redirecting or returning a 404-not-found or something. In that case I don’t need tcpflow—curl
does the job. I type something like curl -I 'http://maccentral.macworld.com/mnn.cgi'
to see what I get. (Curl comes with OS X, I believe.)