move http call to services.js