Hi Jérôme, Thanks for the solutions. I will be using Application.getConnectorService() so that I do not need to touch Representations or Resources.
Many thanks, Kenji Tayama 2008/9/12 Jerome Louvel <[EMAIL PROTECTED]>: > > Hi Kenji, > > This is the expected behavior as the response entity is actually written by > the server connector. > > There is a way to get a hook right before and right after the writing via > the ConnectorService (see Application.getConnectorService()). > > Depending on what you want to achieve, another option would be to create a > custom representation that would do some post-processing/cleaning after the > write(OutputStream) is called. > > Best regards, > Jérôme Louvel > -- > Restlet ~ Founder and Lead developer ~ http://www.restlet.org > Noelios Technologies ~ Co-founder ~ http://www.noelios.com > > -----Message d'origine----- > De : Kenji Tayama [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 12 septembre 2008 07:40 > À : [email protected] > Objet : Re: How to hook end of POST > > Hi Thierry, > > Thank you for the sample codes. > I modifed the codes so they can show this problem. > > You can see that Filter#afterHandle is called before > WriterRepresentation#write in the console. > > Regards, > Kenji Tayama > > 2008/9/11 Thierry Boileau <[EMAIL PROTECTED]>: >> Mail sent on the 09/10 and apparently lost. >> --- >> >> Hello Kenji, >> >> I'm a little surprised by the fact that the Filter#afterHandle method does >> not work as expected. What kind of filter are you suspecting to fail? >> Anyway, I send you a sample code containing 3 classes: an application, a >> resource and a filter. >> The application puts the filter as its own root restlet, thus the >> afterHandle method of the filter is called after all methods. >> >> Please feel free to detail your need, I may have missed something. >> >> Best regards, >> Thierry Boileau >> -- >> Restlet ~ Core developer ~ http://www.restlet.org >> Noelios Technologies ~ Co-founder ~ http://www.noelios.com >> >> Hi, >> >> I'm trying to hook the end of POST calls, and I've tried these : >> >> Filter#afterHandle >> Handler#handleXxx >> Application#handle >> >> Works fine for GET requests, but for POST requests, these get called > before >> response data is sent to the browser. >> >> Is there any way to hook the point when response data is sent? >> >> Thanks, >> Kenji Tayama >> >> > >

