Skip to content
Advertisement

Tag: apache-httpclient-4.x

Apache HttpClient Keep-Alive Strategy for active connections

In an Apache HttpClient with a PoolingHttpClientConnectionManager, does the Keep-Alive strategy change the amount of time that an active connection will stay alive until it will be removed from the connection pool? Or will it only close out idle connections? For example, if I set my Keep-Alive strategy to return 5 seconds for every request, and I use the same

Using google-http-client and google-http-client-apache-v2 behind a proxy produces NonRepeatableRequestException

I’m using google-http-client and google-http-client-apache-v2 libraries to make a POST request behind a proxy. That request produces a NonRepeatableRequestException: It seems like ApacheHttpRequest wraps ByteArrayContent that is repeatable (see JavaDoc) inside a ContentEntity that is non-repeatable. Debuging execution inside google libraries, proxy is returning “407 Proxy Authentication Required”, then it tries to repeat the request (guess that including the credentials)

How to set TCP keep Alive from HttpClient?

My Java application which resides in AWS private subnet connects to an http server via AWS Nat gateway. I am calling a POST request via HttpClient to the HTTP server. That request will take more than 10 minutes to complete. I have configured a socket time out and connection timeout of 1 hour as this this a background task .

Advertisement