Refactor to inject Http request/response instead of copy values