get_rest_client changes

This change moves a lot of the repeated work into get_rest_client and
renames get_rest_client as get_json since we don't actually return a
RestClient instance.