Move http call to a service