Interface ResponseFilter


  • public interface ResponseFilter
    A functional interface to simplify modification and manipulation of responses.
    • Method Detail

      • filterResponse

        void filterResponse​(io.netty.handler.codec.http.HttpResponse response,
                            HttpMessageContents contents,
                            HttpMessageInfo messageInfo)
        Implement this method to filter an HTTP response. The URI, headers, status line, etc. are available in the response parameter, while the contents of the message are available in the contents parameter. The response can be modified directly, while the contents may be modified using the HttpMessageContents.setTextContents(String) or HttpMessageContents.setBinaryContents(byte[]) methods.
        Parameters:
        response - The response object, including URI, headers, status line, etc. Modifications to the response object will be reflected in the client response.
        contents - The response contents.
        messageInfo - Additional information relating to the HTTP message.