io.undertow.client.ClientExchange#setResponseListener() lets you set a
callback that will be invoked once the response headers have been parsed.
You then use the io.undertow.client.ClientExchange#getResponseChannel()
method to read the body. Because this is an XNIO channel it supports
async IO via the use of a read listener, which gives you a callback when
more data arrives.
Stuart
Brian Clozel wrote:
Hi,
I'd like to build an HTTP client that receives chunks of data as part of
a long polling HTTP request, using Undertow's HTTP client. So in a way,
I'd need callback methods like "onHeader" and "onContent".
From what I read in UndertowClient and HttpClientConnection, it looks
like the http client is parsing the *whole* HTTP response and does not
provide those callbacks.
Is there a way to achieve this?
If not, does this qualify as an interesting feature for undertow's HTTP
client?
Thanks,
--
Brian Clozel
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev