0

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

ondway
  • 114
  • 1
  • 11
  • If you don't need to stick with Apache's, the Jetty Project provides a HTTP/2 client that is stable and well tested in the field (disclaimer, I'm the maintainer). See the [generic HttpClient documentation](https://www.eclipse.org/jetty/documentation/current/http-client.html) and the specific [HTTP/2 transport](https://www.eclipse.org/jetty/documentation/current/http-client-transport.html#_http_2_transport). – sbordet Sep 18 '17 at 15:39
  • documentation and few example says, it has not implemented fallback mechanism to http 1.1 yet. There are few other alternative like ok3Client I found on net but I think I would run into similar type of issues there – ondway Sep 18 '17 at 18:30

1 Answers1

0

"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.

Zyber
  • 428
  • 4
  • 21