com.github.nagyesta.lowkeyvault.http.ContentLengthHeaderRemover Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lowkey-vault-client Show documentation
Show all versions of lowkey-vault-client Show documentation
HTTP Client provider for Lowkey Vault tests.
The newest version!
package com.github.nagyesta.lowkeyvault.http;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.protocol.HTTP;
import org.apache.http.protocol.HttpContext;
class ContentLengthHeaderRemover implements HttpRequestInterceptor {
@Override
public void process(final org.apache.http.HttpRequest request, final HttpContext context) {
request.removeHeaders(HTTP.CONTENT_LEN);
// fighting org.apache.http.protocol.RequestContent's ProtocolException("Content-Length header already present");
}
}