September 2009

A very simple python caching proxy

17th September 2009, 1949

A while ago a colleague asked me if I knew of a HTTP proxy tool that would cache and then replay the first response it got, in order to develop a client for a webservice without hammering the service with requests during testing (or doing a lot of work to mock it out). I mentioned Fiddler but that's Windows only. In the end I realised it probably wouldn't take more than 20 lines of python to achieve the desired effect. 10 minutes later I had the following script, just throwing it out there in case its useful to someone else.

This Blog represents my personal views and experiences which are not necessarily the same as those of my employer.