Open Abnaxos opened 4 years ago
It may be better to add an action variant that takes some HTTP response manipulator as argument. The reason is type-safety. An additional interface makes it hard to keep the current level of type-safety up in the routing DSL.
Add a way to set the HTTP status without throwing an exception. That's probably best done with a separate hardcoded interface that has to be implemented by "enriched" responses:
An easy to use fluent default implementation should be provided.
Also add ways to enrich the response to the routing DSL for simple cases:
Consider adding a separate step to convert a response entity to an enriched response to the routing DSL.
NOTE: Setting the status is supported now, add headers