refactor dep injection of http objects