http2 working example of apache http Client 5.0 alpha

1.1k Views Asked by At

I downloaded httpcomponents-client-5.0-alpha2 which supports http2. I copied the example from https://hc.apache.org/httpcomponents-client-5.0.x/httpclient5/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java to see how does I should use it. But example itself fails with "Frame size exceeds maximum" in default size and "org.apache.hc.core5.http2.H2CorruptFrameException: Corrupt or incomplete HTTP2 frame" when I increase the frame to max.

I understand that this is not GA version. Would it helpful if someone can point me to right direction

1

There are 1 best solutions below

0
On

"Frame size exceeds maximum"

this error may be due to you are accessing a site with HTTP1.1 protocol, try accessing a h2 protocol site.