hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <o...@ok2consulting.com>
Subject Re: Closing HTTP connection of indefinite length
Date Thu, 01 Sep 2016 15:31:01 GMT
On August 30, 2016 10:26:29 PM GMT+02:00, Steven Schlansker <stevenschlansker@gmail.com>
>Thanks for the leads -- more questions inline.
>> On Aug 30, 2016, at 11:36 AM, Oleg Kalnichevski <olegk@apache.org>
>> On Mon, 2016-08-29 at 13:49 -0700, Steven Schlansker wrote:
>>> Hi httpclient-users,
>>> I am using HttpClient 4.5.2 / HttpCore 4.4.5 to connect to a
>streaming endpoint.  The endpoint returns chunked records essentially
>>> My application consumes these never ending records until an operator
>signals it to stop.  The code looks something like:
>>> How can I abort this connection cleanly, without needing to read to
>the end of a
>>> never ending stream of data from the server?
>> There are two options:
>> (1) Close the response without closing the content input stream
>I am looking at the HttpResponse interface (and its superinterface,
>HttpMessage) and not seeing
>anything like close().  The interfaces expose almost exclusively getter
>/ setter pairs.
>Did I miss something obvious here?

Look for ClosableHttpResponse in the HttpClient package.

Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

View raw message