Httpdbg is a command line HTTP proxy which dumps all requests and responses to stdout and to a log file.
- Start httpdbg, with a port number as argument. By default, httpdbg only saves headers. Use the -t option to show text.
- Configure the client to use httpdbg as proxy. Host localhost, the same port passed as argument to httpdbg.
- Do the request.
- The request and response is written to httpdbg.log.
$ ./httpdbg -t 8080 ./httpdbg version 0.8 started at port 8080 (http://www.reitshamer.com/source/) GET http://twitter.com/ HTTP/1.1 Accept-Encoding: gzip,deflate Accept-Language: en-us,en;q=0.5 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Host: twitter.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7 Keep-Alive: 300 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ----------------------------END OF HTTP REQUEST---------------------------- HTTP/1.0 200 OK Content-Length: 5432 X-Transaction: 1265741234-96812-30412 Server: hi