GitHub user MYDIH opened a pull request:
https://github.com/apache/httpcomponents-client/pull/110
Overload Request's execute method to allow custom CloseableHttpClient
Hi,
It's a really minor improvement. The idea is to enable a user to specify a
custom client to execute fluent Requests with. The final goal in my case is to
being able to change the KeepAlivePolicy easily, without using a custom
Executor.
I will explain my specific case now. We build a lib which uses fluent
Requests. Everything was working fine, but at some point we changed our
firewall setup. The firewall is killing open connections (which are, obviously,
not transmitting data) without warning after an hour. By default, the keep
alive policy used by HttpClient permits connections to stay alive forever. We
need to change that. However, we built some code around the fluent api already,
adding a custom executor in there wouldn't be trivial.
I guess there is other cases where a custom client could be helpful.
If I missed something, like another way to set a keepAlivePolicy on a
fluent Request, please tell me.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MYDIH/httpcomponents-client master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/httpcomponents-client/pull/110.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #110
----
commit da6ca9d805cd4c47cbfad35a975b54a980ca2ba1
Author: Nicolas Gomez <nicolas@...>
Date: 2018-08-29T08:07:49Z
Overload Request's execute method to allow custom CloseableHttpClient
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]