HttpClient 4.0.1 – how to release connection? [duplicate]

The recommended way, by Httpcomponents 4.1, is to close connection and release any underlying resources:

EntityUtils.consume(HttpEntity)

where HttpEntity passed is a response entity.

Leave a Comment