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 Mike Cumings <mc...@gmail.com> on 2009/06/15 19:54:11 UTC

Is it possible to send a request without blocking for the response?

Good day all,

With httpclient (any version), is it possible to execute a method
without blocking to wait for the response from the server?  If I call
HttpClient.execute(...) the operation appears to block until (at
minimum) the response header has been received.  In 4.x, it appears
that execute(...) returns an HttpResult object, but it again seems to
block before returning this object.  In the 4.x code base, I found the
following use case description which seems to be what I'm after:

http://wiki.apache.org/jakarta-httpclient/UseCases/SingleAsyncRequest

Basically, I'd like to fully write and flush the request to the
upstream server, hand off control to another thread, then come back
and attempt to obtain the results.  Unless I drop down to the HttpCore
API, I'm not seeing a way to do this. :-/  Assuming this use case was
implemented, can someone please point me in the right direction?
Thanks in advance,

-- 
Mike Cumings

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