我有一个代码(实际上是从jetty-project repo复制的):
HTTP2Client http2Client = new HTTP2Client();
SslContextFactory sslContextFactory = new SslContextFactory();
HttpClient httpClient = new HttpClient(new HttpClientTransportOverHTTP2(http2Client), sslContextFactory);
Executor executor = new QueuedThreadPool();
httpClient.setExecutor(executor);
httpClient.start();
ContentResponse response = httpClient.GET("https://www.google.com/");
由于某种原因,它无限期地等待响应。有什么问题呢?我正在寻找一个http / 2客户端使用的工作示例来访问一些https网址。谢谢!