- move common http and json logic in to abstract api