RestFilters for ES 5.x

you have to return a factory like this:

UnaryOperator<RestHandler> getRestHandlerWrapper(ThreadContext threadContext) {
    return originalHanlder ->
        (RestHandler) (request, channel, client) -> {
            System.out.println("Log Something");
            originalHanlder.handleRequest(request, channel, client);
        };
}
1 Like