Hello, I forgot to say, that you will need to override the afterHandle method.
Best regards, Thierry Boileau Hello Joey, > > you can add a filter in front of your application. That is to say, instead > of directly attaching your application, you can attach the filter, which > sets the application as its "next" attribute. > > Best regards, > Thierry Boileau > > > Hello community, >> >> I quite like the Restlet framework and am trying to create a new >> webservice with it which should be ultimately be consumed by a >> flash/activescript client. >> >> That brings a problem with it, as I had the initial design to rely on HTTP >> repsonse codes to indicate errors. This will not work across the board in >> all browsers, as flash runs in it's own security context and the browser >> might intercept the response code. >> >> Since I'm sending JSON back and forth I added a field to include >> "status":"ok" or "status":"failed" as part of every response. Furthermore I >> added a request parameter (supress_error) which get's checked in my custom >> status service implementation and overwrites the response code accordingly. >> >> This works obviously fine in cases of error, but it does not work if the >> request responds with a 201 "resource created" which is not an error or >> similar, but I'd still like to dynamically translate this into a HTTP >> response code 200 message. >> >> My question would be, where can I register this in the code? >> At the moment I have a simple Application which creates as part of the >> createInboundRoot method a router which dispatched the request to my various >> resources. I tried to create in the same application a createOutboundRoot >> but that failed. >> >> Would I need to attach a new restlet to the routes to achieve this >> functionality, or is there a central point where I can register a filter for >> every outgoing response from a server resource? >> >> Thanks in advance >> >> Joey >> > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2654146

