Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-18 Thread Oleg Kalnichevski
On Thu, 2018-05-17 at 09:17 -0600, Shawn Heisey wrote: > On 5/17/2018 3:51 AM, Oleg Kalnichevski wrote: > > HttpClientBuilder in HC4 got overloaded with so many connection > > management parameters which could easily get rendered ineffective > > by > > explicitly passing an instance of

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-17 Thread Shawn Heisey
On 5/17/2018 3:51 AM, Oleg Kalnichevski wrote: HttpClientBuilder in HC4 got overloaded with so many connection management parameters which could easily get rendered ineffective by explicitly passing an instance of HttpClientConnectionManager to the builder. The same could with HC5 would look

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-17 Thread /
Config() throws PCEConfigParamNotFoundException { // setup request timeouts return RequestConfig.custom().setConnectionRequestTimeout(aaa). setConnectTimeout(bbb). setSocketTimeout(ccc).build(); } -Original Message- From: / [mailto:isla...@yahoo.co.uk.INVALID] Sent: Wednesday, May 1

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-17 Thread Oleg Kalnichevski
; > HttpResponse serviceResponse = httpClient.execute(httpRequest, > > > httpContext); > > > > > > > > > // make the request config > > > private RequestConfig getRequestConfig() throws > > > PCEConfigParamNotFoundException { > > >

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-17 Thread Oleg Kalnichevski
On Wed, 2018-05-16 at 14:11 -0600, Shawn Heisey wrote: > On 5/16/2018 8:42 AM, Shawn Heisey wrote: > >   RequestConfig rc = > > RequestConfig.custom().setConnectTimeout(15000) > >           .setSocketTimeout(12).build(); > >   httpClient = HttpClients.custom().setDefaultRequestConfig(rc) > >

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread /
). setConnectTimeout(bbb). setSocketTimeout(ccc).build(); } -Original Message- From: / [mailto:isla...@yahoo.co.uk.INVALID] Sent: Wednesday, May 16, 2018 4:01 PM To: httpclient-users@hc.apache.org Subject: Re: Fwd: HttpClient5 : simple example on how to configure timeout after build() Thanks, if I

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Shawn Heisey
On 5/16/2018 8:42 AM, Shawn Heisey wrote: >   RequestConfig rc = RequestConfig.custom().setConnectTimeout(15000) >           .setSocketTimeout(12).build(); >   httpClient = HttpClients.custom().setDefaultRequestConfig(rc) >

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Oleg Kalnichevski
CEConfigParamNotFoundException { > > // setup request timeouts > return RequestConfig.custom().setConnectionRequestTimeout(aaa). > setConnectTimeout(bbb). setSocketTimeout(ccc).build(); > } > > > > > > > > -Original Message- > From: / [mailto:is

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Oleg Kalnichevski
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

RE: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Daly, Paul
Subject: Re: Fwd: HttpClient5 : simple example on how to configure timeout after build() 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

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread /
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. 4) Keep the RequestConfig.

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Shawn Heisey
On 5/16/2018 8:09 AM, / wrote: I am looking for an example on how to configure HttpClient5 after it has been built and how to extract/print some of its configuration. Once I have an HttpClient object, how do I go about and change some of its settings, for example connection timeout or

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Oleg Kalnichevski
On Wed, 2018-05-16 at 17:09 +0300, / wrote: > Hi there, > > I am looking for an example on how to configure HttpClient5 after it > has  > been built and how to extract/print some of its configuration. > > Once I have an HttpClient object, how do I go about and change some > of  > its settings,

Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread /
Hi there, I am looking for an example on how to configure HttpClient5 after it has been built and how to extract/print some of its configuration. Once I have an HttpClient object, how do I go about and change some of its settings, for example connection timeout or user-agent-string or even