HI,
I am using the Fluent API with HttpClient 4.5 like this:

Executor.newInstance(myClient).execute(myRequest).handleResponse(myResponseHandler)
 [1]

Although “myClient" is setup with the default HttpRequestRetryHandler this 
isn’t triggered when myResponseHandler throws an IOException on an idempotent 
request method.
OTOH I can trigger it when I call CloseableHttpClient.execute(HttpUriRequest, 
ResponseHandler)[1] and the given response handler throws an IOException.

This is not really clear from the javadoc.

What is the best way to implement a retry for the Fluent API without doing it 
completely manually?

Thanks,
Konrad

[1] - 
https://hc.apache.org/httpcomponents-client-4.5.x/current/fluent-hc/apidocs/org/apache/http/client/fluent/Executor.html#execute(org.apache.http.client.fluent.Request)
[2] - 
https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/client/CloseableHttpClient.html#execute(org.apache.http.client.methods.HttpUriRequest,%20org.apache.http.client.ResponseHandler)


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Reply via email to