hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From visualize <krister.kra...@gmail.com>
Subject HttpClient 4.0
Date Wed, 23 Sep 2009 08:30:10 GMT


I'm trying to port my application to use HttpClient 4.0 instead of version
3.0 I make a substantial number of HTTP-gets and used to use
aMultiThreadedHttpConnectionManager to setup a pool and retrieve clients. 

Let's say I want to get some stuff from
"http://my.server.com:8080/my-rest-service/data" and

In 3.0 you are able to set host and port via
getHostConfiguration().setHost(host, port) which was kind of 
convenient since I then could just create the pool, and when getting clients
just set the host and port to "http://my.server.com" and 8080. In each
request, I just had to set the URL to "/my-rest-service/data" or
"/my-rest-service/data2" and didn't have to care about the host and port.

Is there a way to accomplish the same with a client of version 4.0? Like set
a default host/route (or whatever you may call it), so when doing new
HttpGet("/my-rest-service/data") it "falls back" to the default one?

/ K

View this message in context: http://www.nabble.com/HttpClient-4.0-tp25531034p25531034.html
Sent from the HttpClient-User mailing list archive at Nabble.com.

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

View raw message