Simple http helper to handle json rest calls