A wrapper to get a JSON  object over HTTP