abstract code for the RequestHandlers