On Wed, 2018-05-16 at 18:01 +0300, / wrote: > Thanks, > > if I understood correctly, the pattern should be: > > 1) Create a RequestConfig (rc) object and keep it. > 2) If you need to modify httpclient, modify the kept RequestConfig > object > 3) After doing said modifications **re-create httpclient** with kept > RequestConfig.
Please do not do that. There is no need to re-create the client. If you have a custom RequestConfig, stick it into the request object or the HttpContext associated with it. 4) Keep the RequestConfig. > 5) Keeping a client and modifying it as see fit is/will be > deprecated. > > Questions: > can I extract a RequestConfig from current client, modify its > timeout > and then re-create a client with this cloned-and-modified > RequestConfig? > (so as not to keep a RequestConfig at all but remember all the > settings > I did to my client). > RequestConfig used to execute a particular request will be available in the HttpContext. HttpClient instance merely holds default settings. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org