HTTPCLIENT-1507: clarified behavior of CloseableHttpResponse#close()
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1596521 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ba8a897f3
commit
c5b8b8db5d
|
@ -50,9 +50,10 @@ public class QuickStart {
|
|||
// The underlying HTTP connection is still held by the response object
|
||||
// to allow the response content to be streamed directly from the network socket.
|
||||
// In order to ensure correct deallocation of system resources
|
||||
// the user MUST either fully consume the response content or abort request
|
||||
// execution by calling CloseableHttpResponse#close().
|
||||
|
||||
// the user MUST call CloseableHttpResponse#close() from a finally clause.
|
||||
// Please note that if response content is not fully consumed the underlying
|
||||
// connection cannot be safely re-used and will be shut down and discarded
|
||||
// by the connection manager.
|
||||
try {
|
||||
System.out.println(response1.getStatusLine());
|
||||
HttpEntity entity1 = response1.getEntity();
|
||||
|
|
Loading…
Reference in New Issue