作者:手机用户2602883105 | 来源:互联网 | 2023-02-02 15:43
我正在试验HTTP/2
客户jdk 9-ea+171
.代码取自此示例:
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI("https://www.google.com/"))
.build();
HttpResponse respOnse= client.send(request, HttpResponse.BodyHandler.asString());
但客户端永远挂在最后一行.请指教如何解决?
调试显示它在方法中无限等待waitUntilPrefaceSent()
.