using rest client