@Immutable public class RequestContent extends java.lang.Object implements HttpRequestInterceptor
Content-Length or Transfer-Content headers based
on the properties of the enclosed entity and the protocol version.
This interceptor is required for correct functioning of client side protocol
processors.| Constructor and Description |
|---|
RequestContent()
Default constructor.
|
RequestContent(boolean overwrite)
Constructor that can be used to fine-tune behavior of this interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(HttpRequest request,
HttpContext context)
Processes a request.
|
public RequestContent()
Content-Length or Transfer-Encoding
will cause the interceptor to throw ProtocolException if already present in the
response message.public RequestContent(boolean overwrite)
overwrite - If set to true the Content-Length and
Transfer-Encoding headers will be created or updated if already present.
If set to false the Content-Length and
Transfer-Encoding headers will cause the interceptor to throw
ProtocolException if already present in the response message.public void process(HttpRequest request, HttpContext context) throws HttpException, java.io.IOException
HttpRequestInterceptorprocess in interface HttpRequestInterceptorrequest - the request to preprocesscontext - the context for the requestHttpException - in case of an HTTP protocol violationjava.io.IOException - in case of an I/O error