add support for request pre-processors, and add tests for them