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 Gaurav Kumar <ga...@gmail.com> on 2013/04/17 08:47:45 UTC
is onCharReceived called after onResponseReceived? and accessing
HttpResponse in AsyncHttpClient
Hi,
Two questions-
1)
In
org.apache.ht
tp.nio.client.methods.AsyncCharConsumer, is onCharReceived called after
onResponseReceived?
So far my testing shows so but I am looking for official documentation. Can
someone please point to me to documentation which describes the order in
which these events are called
?
2)
Also, does HttpResponse response in onResponseReceived (
org.apache.ht
tp.nio.client.methods.AsyncCharConsumer
)
contain full response or just headers?
I think it contains only headers as when I try to access content, I get
exception-
SEVERE: http-outgoing-2 [ACTIVE(666)] HTTP protocol exception: Content has
not been provided
java.lang.IllegalStateException: Content has not been provided
Can someone please confirm this?
I am using httpasyncclient version 4.0-beta3
Re: is onCharReceived called after onResponseReceived? and
accessing HttpResponse in AsyncHttpClient
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2013-04-16 at 23:47 -0700, Gaurav Kumar wrote:
> Hi,
> Two questions-
>
> 1)
>
> In
>
> org.apache.ht
>
> tp.nio.client.methods.AsyncCharConsumer, is onCharReceived called after
> onResponseReceived?
>
This is correct.
> So far my testing shows so but I am looking for official documentation. Can
> someone please point to me to documentation which describes the order in
> which these events are called
> ?
>
Unfortunately other things always kept me busy and I had no bandwidth
for HttpAsyncClient documentation.
> 2)
> Also, does HttpResponse response in onResponseReceived (
>
> org.apache.ht
>
> tp.nio.client.methods.AsyncCharConsumer
> )
> contain full response or just headers?
> I think it contains only headers as when I try to access content, I get
> exception-
> SEVERE: http-outgoing-2 [ACTIVE(666)] HTTP protocol exception: Content has
> not been provided
> java.lang.IllegalStateException: Content has not been provided
>
> Can someone please confirm this?
>
HTTP messages passed to async message consumers contain full message
head (status line or request line plus all headers) and an HttpEntity
which is not attached to any data stream and is merely a descriptor.
Hope this helps
Oleg
> I am using httpasyncclient version 4.0-beta3
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org