Class HttpClient5Utils

  • public class HttpClient5Utils
    extends java.lang.Object
    This class is used to provide a facility to initialize httpclient5 lib based Http/2 Client. Currently, the compatible API offered by httpclient5 (, which supports both http/1.1 and http/2 is buggy since it couldn't recover from a crashed peer, and here is the behavior when the peer crashes: 1. The H2 connection created by httpclient5 won't terminate on its own. 2. After the peer is back, the compatible API will continue to use the same connection, which will stuck. There is one constraint with the httpclient5 H2 specific API: and the H2 initial window size of the peer needs to be 65535 or lower. For now, if we want to use http/1.1, we will need to use httpasyncclient-4.x directly. TODO: follow up with the httpclient team to get a proper fix.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpClient5Utils

        public HttpClient5Utils()