我正在尝试使用 apache 客户端发出 HTTP/2 请求。以下版本是否可行?
迁移我的 Web 应用程序中的版本花费了我大量的代码更改。在 httpclient-4.2.5.jar 中是否有支持 HTTP/2 和 TLSv1.3 的解决方法?
Apache libs i'm using:
httpclient-4.2.5.jar
httpcore-4.2.4.jar
httpmime-4.2.5.jar
提前致谢。
最佳答案
看起来只有版本 5 才支持 HTTP 2。Apache Http Client Status
The main focus of the 5.0 series is providing full-featured support for HTTP/1.1 and HTTP/2 and ensuring full compliance with RFC 7230, RFC 7231, RFC 7540 and RFC 7541.
根据Apache Http Client News它仍然不是版本 5 的稳定版本。
但是,从 Java 11 开始,有一个新的 Http Client introduced支持 HTTP 2。
It supports HTTP/1.1 and HTTP/2, both synchronous and asynchronous programming models
关于apache-httpclient-4.x - 是否可以使用 Apache HTTPClient 4.2.5 发出 HTTP/2 请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59527346/