abstracting away from http