CFY-716 use a helper method for creating a rest client