Added http wrapper interface to make it testable.