hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stevo Slavić <ssla...@gmail.com>
Subject Re: Changing connection manager params
Date Wed, 19 Jan 2011 08:57:18 GMT
Besides 4.1-beta2-snapshot [1], I don't see 4.1 (GA) at maven central
[2]. Switched to that snapshot.

Found means to change configuration - most I couldn't initially find
moved from http connection manager (in 3.1) to httpclient (in 4.0),
and then in 4.1 some *PNames values got deprecated and configuration
moved to implementations like ThreadSafeClientConnManager so can not
code to interfaces but to implementation on some places.

Some API changes between 3.1 and 4.x I'm not sure if they are equivalent:

- HttpRequestBase seems to be new HttpMethodBase, but couldn't find
replacement for setFollowRedirects - maybe setting
ClientPNames.MAX_REDIRECTS parameter to 0 is equivavalent
- old HttpMethodBase.getResponseCharSet/getRequestCharSet it seems to
be replaced by EntityUtils.getContentCharSet(response.getEntity())
- not sure what replaces PostMethod.addParameter(paramName, paramValue)
- getStatusCode and getStatusText present in HttpMethodBase seem to be
removed in favour of just keeping getStatusLine in HttpResponse


Regards,
Stevo.

[1] https://repository.apache.org/content/repositories/snapshots/org/apache/httpcomponents/httpclient/4.1-beta2-SNAPSHOT/
[2] http://repo2.maven.org/maven2/org/apache/httpcomponents/httpclient/

On Tue, Jan 18, 2011 at 9:57 PM, Oleg Kalnichevski <olegk@apache.org> wrote:
> On Tue, 2011-01-18 at 21:23 +0100, Stevo Slavić wrote:
>> Hello httpclient users,
>>
>> Can someone please just validate if following is true or not. It seems
>> to me that it was possible in 3.x to change connection manager
>> parameters even after it's construction. It doesn't seem possible now
>> in 4.0.x, without instantiating new connection manager.
>>
>
> It should certainly be possible with 4.0.x, but I would recommend
> upgrading to 4.1 which has a better API for connection pool management.
>
> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

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


Mime
View raw message