netty/netty — pull request #3092 by fredericBregier (2014-11-02 12:22:44+00:00)
Title: First proposal for Netty REST support

As queries in #3023, I propose a partial REST support for Netty.
The idea is that full REST is not possible since business dependent
(what to do with the request, what kind of arguments, what kind of
body, ...).
But however several "common" options (as far as I imagine) could be
shared in a global REST simple support.
Obviously this one is not intended to replace huge and perfect implementations
already based on Netty. It is only intend to help "simple" REST implementation
based on a subset of needs.

Among those needs we have:
- ability to be DOS protected (using a timestamp check) (inspired from standard REST services)
- ability to be man in the middle protected (using a signature of each request) (inspired from standard REST services)
- ability to decode the body as usual (HttpPostRequestDecoder) or through other ways (for XML, JSON, ...)
- ability to manage several "business" handlers, according to the base uri (where base uri is "baseuri" in http://host:oprt/baseuri/suburis?args)
- ability to extend as much as possible this handler (either main one, or business ones) such to fit the business needs or specificities
- ability to have a standard "OPTIONS" answer such that client could adapt their request according to the available described services

This is only a proposition, to be discussed and eventually, if useful for the community, merged, or if not a good idea, to serve as an example of implementation.