On Tue, 2022-09-06 at 14:26 +0200, Julian Reschke wrote: > Hi HC devs! > > I'm currently doing a little investigation on the support of 1xx > messages in Java HTTP clients, ranging from broken > (HTTPURLConnection), > over "not broken" (Apache HttpClient4) to hopefully "fully supported" > (Apache HttpClient5). > > I found > < > https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/ > apidocs/org/apache/hc/client5/http/async/AsyncExecCallback.html#handl > eInformationResponse(org.apache.hc.core5.http.HttpResponse)>, > but I'm currently struggling how to use that from a minimal async > client. > > My current code is over here: > > > https://github.com/greenbytes/java-http-1xx-tests/blob/224c0f374622ce1c892498f7f148ed81eee1aa92/src/test/java/org/greenbytes/http/test1xx/TestHttp1xx.java#L128 > > and I'm trying to understand how to invoke "execute(...)" to actually > get access to the 1xx responses. > > Pointers appreciated. > > Best regards, Julian > >
Hi Julian Here's an example of how one can use async HttpClient in a full duplex mode including handling of intermediate informational responses: https://github.com/apache/httpcomponents-client/blob/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientFullDuplexExchange.java Hope this helps Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
