try to create a rest client in Java.