Add another handler body type: callback #12
This change has been suggested before, but there are a couple of issues with it.
- A change like this requires a change to the Ring specification. This should really be first discussed in the Ring group, so that other people have a chance to voice their opinions.
- Obviously only one type of callback function can be implemented on the
:bodykey, so we need to be certain that an OutputStream callback is really what we want. Once a decision is made, it's hard to reverse.
In theory, I've got no real problem with this. But please start a thread on the Ring group first, as this merits discussion.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I have a scenario, where I want to return a result of XSLT transformation (that's XML templating). I'm using a Saxon processor, which accepts OutputStream (or Writer) and serializes a formatted xml there.
Ideally this would be response's OutputStream, but in ring 0.3.6 there is no way to do it -- even with java's PipedStreams, the generated body would have to be held in memory and passed to ring-servlet/set-body.
I believe there might be more scenarios like this, and so made this simple addition.
Regards,
Martin.