In fact, there are several higher level interfaces that can be bound to method parameters of controllers. These include:

    In addition, for full control over the emitted HTTP response you can use the static factory methods of the class which return a MutableHttpResponse.

    The following example implements the previous example using the and HttpResponse objects:

    Request and Response Example

    Request and Response Example

    is also available from static context via ServerRequestContext.