Richard Barnett created HTTPCLIENT-1336:
-------------------------------------------

             Summary: Document Entity-consuming behaviour of HttpClient.execute 
methods with ResponseHandler param
                 Key: HTTPCLIENT-1336
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1336
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: Documentation, HttpClient
    Affects Versions: 4.2.3
            Reporter: Richard Barnett
            Priority: Minor


AbstractHttpClient implementations of the HttpClient.execute methods with a 
ResponseHandler parameter consume the response entity:

        HttpResponse response = execute(target, request, context);
        T result;
        try {
            result = responseHandler.handleResponse(response);
        } catch (Exception t) { ... }
        HttpEntity entity = response.getEntity();
        EntityUtils.consume(entity);
        return result

Document this in javadoc somewhere; probably either ResponseHandler or 
HttpClient.  (It's not clear whether this behaviour is part of the HttpClient 
interface contract for these execute methods.)

(I hit this because I used one of these methods to work round HTTPCLIENT-1335.)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to