Package com.browserup.bup.filters
Interface RequestFilter
-
public interface RequestFilterA functional interface to simplify modification and manipulation of requests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.netty.handler.codec.http.HttpResponsefilterRequest(io.netty.handler.codec.http.HttpRequest request, HttpMessageContents contents, HttpMessageInfo messageInfo)Implement this method to filter an HTTP request.
-
-
-
Method Detail
-
filterRequest
io.netty.handler.codec.http.HttpResponse filterRequest(io.netty.handler.codec.http.HttpRequest request, HttpMessageContents contents, HttpMessageInfo messageInfo)Implement this method to filter an HTTP request. The HTTP method, URI, headers, etc. are available in therequestparameter, while the contents of the message are available in thecontentsparameter. The request can be modified directly, while the contents may be modified using theHttpMessageContents.setTextContents(String)orHttpMessageContents.setBinaryContents(byte[])methods. The request can be "short-circuited" by returning a non-null value.- Parameters:
request- The request object, including method, URI, headers, etc. Modifications to the request object will be reflected in the request sent to the server.contents- The request contents.messageInfo- Additional information relating to the HTTP message.- Returns:
- if the return value is non-null, the proxy will suppress the request and send the specified response to the client immediately
-
-