This ticket may actually belong under Sparkle, especially if the right way to do this is from Middleware, but basically I want to watch for some conditions on all requests coming to my XData server (possibly before it's dispatched to XData) and return arbitrary data back: setting code, ContentType, content, etc. (hopefully ContentLength would be auto-calculated, but maybe setting it too, if not).
What is the easiest way to do this?
I first thought that it should be done at XData level, but then I would have to add extra code to every exposed method, then I remembered the Middlware and it looks like it could be possible with Generic one, without even subclassing it. But when I tried simply doing Context.Response.Content.WriteData('
Test Page
'), it did not work: ContentLength was 0, etc.