Package com.browserup.bup.filters
Interface ResponseFilter
-
public interface ResponseFilterA functional interface to simplify modification and manipulation of responses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfilterResponse(io.netty.handler.codec.http.HttpResponse response, HttpMessageContents contents, HttpMessageInfo messageInfo)Implement this method to filter an HTTP response.
-
-
-
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 theresponseparameter, while the contents of the message are available in thecontentsparameter. The response can be modified directly, while the contents may be modified using theHttpMessageContents.setTextContents(String)orHttpMessageContents.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.
-
-