commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <>
Subject Re: Will HttpClient wait for response before continuing?
Date Mon, 07 Feb 2005 17:16:59 GMT

No it won't. The releaseConnection method among obvious things such as
returning the connection back to the connection manager also makes sure
that the connection is actually reusable if it is kept alive (open).
That pretty much implies making sure that the response body is fully
consumed. If your application does not consume the response body in its
entirety, the releaseConnection method will do it for it.

Hope this answers your question.


On Mon, Feb 07, 2005 at 10:18:49AM -0600, Stephen Charles Huey wrote:
> If you do a GET or POST and call getResponseBodyAsString, HttpClient
> obviously has to wait for the response.  If you don't call that, will it
> just continue on to the next request before finishing getting the
> response from the first one?  I'm trying to debug some connection
> pooling stuff on our web app.  Here's some sample code from my load
> tester:
> int result = hc.executeMethod(getLogin);
> getLogin.releaseConnection();
> doNothing(2000);  // wait 2 seconds
> hc.executeMethod(getCreate);
> getCreate.releaseConnection();
> doNothing(2000);  // wait 2 seconds
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message