T - the handler result typepublic class FilterContext<T> extends Object
FilterContext can be used to decorate Request and AsyncHandler from a list of RequestFilter.
RequestFilter gets executed before the HTTP request is made to the remote server. Once the response bytes are
received, a FilterContext is then passed to the list of ResponseFilter. ResponseFilter
gets invoked before the response gets processed, e.g. before authorization, redirection and invocation of AsyncHandler
gets processed.
getResponseStatus() returns an instance of HttpResponseStatus
that can be used to decide if the response processing should continue or not. You can stop the current response processing
and replay the request but creating a FilterContext. The AsyncHttpClient
will interrupt the processing and "replay" the associated Request instance.| Modifier and Type | Class and Description |
|---|---|
static class |
FilterContext.FilterContextBuilder<T> |
| Modifier and Type | Method and Description |
|---|---|
AsyncHandler<T> |
getAsyncHandler() |
IOException |
getIOException() |
Request |
getRequest() |
io.netty.handler.codec.http.HttpHeaders |
getResponseHeaders() |
HttpResponseStatus |
getResponseStatus() |
boolean |
replayRequest() |
public AsyncHandler<T> getAsyncHandler()
AsyncHandlerpublic HttpResponseStatus getResponseStatus()
HttpResponseStatuspublic io.netty.handler.codec.http.HttpHeaders getResponseHeaders()
HttpHeaderspublic boolean replayRequest()
Request be executed.public IOException getIOException()
IOExceptionCopyright © 2020. All rights reserved.