Refactor to the http layer to start uncoupling the Apache implementation from the generic interfaces