What are the main differences between org.restlet.Client and org.restlet.resource.ClientResource?
I’ve seen the classes used semi-interchangeably, so I’m mainly just looking for a general rule for when one should be used over the other.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
org.restlet.Client is the low-level API to execute REST requests with Restlet. org.restlet.resource.ClientResource internally uses this class to actually access RESTful applications. So ClientResource is generally the class to use in order to execute client requests to such applications.
One very interesting feature you should consider with ClientResource is the ability to use annotated interfaces as described below.
Now how to use the interface:
As you can see, everything is now hidden to you (conversion, conneg…).
Hope it helps you.
Thierry