Add pre-processing for requests and responses.