You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Julian Reschke <ju...@gmx.de> on 2022/09/06 12:26:59 UTC

help needed in testing 1xx support

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#handleInformationResponse(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


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


Re: help needed in testing 1xx support

Posted by Oleg Kalnichevski <ol...@apache.org>.
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org