You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Oleg Kalnichevski <ol...@apache.org> on 2012/01/04 17:29:10 UTC

Re: HttpUriRequest.abort vs EntityUtils.consume

On Fri, 2011-12-30 at 07:23 -0500, Chad La Joie wrote:
> In cases where there is no body, or you don't care about the body, in
> the response is there a difference between calling abort() on the
> request and using EntityUtils.consume on the response?
> 

EntityUtils#consume attempts to keep the connection alive by reading the
message until the end of stream, while HttpUriRequest#abort simply shuts
down the underlying connection.

Oleg 


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