Class HttpRequestAutoDrainingServiceFilter

java.lang.Object
io.servicetalk.http.utils.HttpRequestAutoDrainingServiceFilter
All Implemented Interfaces:
HttpExecutionStrategyInfluencer, StreamingHttpServiceFilterFactory, ExecutionStrategyInfluencer<HttpExecutionStrategy>

public final class HttpRequestAutoDrainingServiceFilter extends Object implements StreamingHttpServiceFilterFactory
Configure automatic consumption of request payload body when it is not consumed by the service.

For persistent HTTP connections it is required to eventually consume the entire request payload to enable reading of the next request. This is required because requests are pipelined for HTTP/1.1, so if the previous request is not completely read, next request can not be read from the socket. For cases when there is a possibility that user may forget to consume request payload, this filter can be used to automatically consume request payload body on the server-side. An example of guaranteed consumption are non-streaming APIs.

See Also: