V-O*_*V-O 8 java java-http-client java-11
我看到 JDK9 中支持预告片(该HttpResponse.trailers\xe2\x80\x8b()方法),但在 JDK 10 上不再支持(该HttpResponse.trailers\xe2\x80\x8b()方法不存在)。
我目前正在使用 JDK11,当我尝试我的请求时:
\nHttpRequest request = HttpRequest.newBuilder()\n .uri(uri)\n .GET()\n .build();\n\n\nHttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString());\nRun Code Online (Sandbox Code Playgroud)\n我面对一个java.util.concurrent.ExecutionException: java.io.IOException: no statuscode in response. 仅当我请求带有预告片标题的页面时,它才会失败。\n欢迎任何帮助。谢谢
| 归档时间: |
|
| 查看次数: |
265 次 |
| 最近记录: |