Refactored the code to make it a little easier the extend Requests with a "preprocessor" (i.e. a caching system or a logger).