Hi Andrea,

A comment from me: is there really a need of two functions ?
SerializableFunction<AttributesWrapper, Object> respondFunction,
SerializableFunction<Object, String> outputTextFunction

IMO one function is enough: SerializableFunction<AttributesWrapper, Void>
respondFunction
There the developer could use the webRequest and WebResponse from the
attributes and read/write whatever is needed.

Also in the current impl it seems to be possible to write response body for
HEAD requests. I guess the idea is to leave it to the application to decide
what to do in the respondFunction. But maybe you could help a bit by
passing HeaderOnlyWebResponse in the attributes and throw an exception if
#write() methods are used.


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Dec 2, 2016 at 5:50 PM, Andrea Del Bene <an.delb...@gmail.com>
wrote:

> Hi,
>
> in the next days I'd like to finalize a new module to add to Wicketstuff
> (for Wicket 8) that adds the ability to write REST services using lambdas,
> in a way that resembles  Spark web framework ( to be confused with
> thenamesake big data framework). I'd like to write an article about it
> where I will also mention the upcoming lambda support (for this part I will
> reference Martijn presentation :-) ). But before proceeding I'd like to
> hear your opinion.
>
> The module's repository with the a short introduction is here:
> https://github.com/bitstorm/wicketstuff-rest-lambda
>
>
> Thank you.
>
> Andrea.
>
>

Reply via email to