Hi Faisal,

Yes, it is possible to optimize this since Restlet 1.2 M2 released this
week! For this you can leverage the new ServerResource (instead of
Resource), the getInfo() methods and the RepresentationInfo class which
contains the "tag" property without the rest of the representation.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com
 

-----Message d'origine-----
De : Faisal [mailto:faisal-f.k...@ubs.com] 
Envoyé : vendredi 3 avril 2009 12:31
À : discuss@restlet.tigris.org
Objet : RE: Example of using the Tag class with Restlet

Hi Jerome,

Thanks for the reply and apologies for a delayed acknowledgment. I was
execpting something more complicated than just setting a valid eTag, works
well, thanks.

Is there a way to manually check the tag coming in with the request so I can
avoid generating the XML response only to return a 304, so as to reduce
unneccesary work on the server side.

Regards
Faisal



Hi Faisal,

If you use Restlet Resource subclasses, the conditional gets should be
handled automatically for you. You just need to set the Representation#tag
property on your result entities.
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios
Technologies ~ Co-founder ~ http://www.noelios.com
 

-----Message d'origine-----
De : Faisal [mailto:faisal-f.k...@ubs.com] Envoyé : jeudi 19 mars 2009 17:54
À : discuss@restlet.tigris.org Objet : Example of using the Tag class with
Restlet

Hi,

I am struggling to find an example of how to implement etag functionality in
my restlet service. Have tried to search but to no avail.

Can anyone provide example of how I can verify the state of the tag and
content so as to decide whether to send the new XML response or content not
modified response.

Thanks
Faisal
--
View this message in context:
http://n2.nabble.com/Example-of-using-the-Tag-class-with-Restlet-tp2504042p2
504042.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=13564
77

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=14161
52



--
View this message in context:
http://n2.nabble.com/Example-of-using-the-Tag-class-with-Restlet-tp2504042p2
579899.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=15310
12

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1531040

Reply via email to