Hi Andi, Thanks for the feed-back on the dynamic capabilities of Restlet. Note that those capabilities combined with OSGi dynamic features make a great combination (see new OSGi edition and upcoming OSGi extension).
Back to your question. As Restlet is both a client-side and server-side API, you can perfectly take the Request instance received and pass it to a client connector with no modification beside the target resource URI and any property you want to set or update. You don't need to recreate a Request from scratch. The Redirector class provides a simple reverse proxy working just like that. Also, it is possible to create a ClientResource by wrapping an existing Request object that will serve as a prototype object to be cloned for each call. Best regards, Jerome -- http://www.restlet.org http://twitter.com/#!/jlouvel -----Message d'origine----- De : Andreas Egloff [mailto:[email protected]] Envoyé : jeudi 10 novembre 2011 19:02 À : [email protected] Objet : Client abstraction We're happy campers with the server side capabilities Restlet provides us; particularly the dynamic ability to define and register resources has set this apart from other (to remain unnamed) frameworks we used. This is crucial in the declarative and pluggable environment we have. Now I have a question on the client abstraction though in Restlet. In our use cases it is common that we're essentially proxying some kind of RESTful call. We may be augmenting some of the call details (e.g. authentication, additional headers etc), or these may already be contained in the original caller's details. If we use the client resource abstraction that gives us a nice interface for when we need to augment the request (e.g. setting basic auth settings). But, it also explicitly prevents us from passing through/setting headers directly if the same header is also exposed through the API. If we drop down to a lower level API then we maybe would just as well go to plain http client calls. For our purposes it would be ideal to allow both; having a way to set/pass through headers and other request details; yet, also allow us access to a higher level API abstraction to manipulate/augment when desired. Any suggestions? Thanks, Andi ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=28770 10 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2877261

