我想问一下这段代码执行后是否会自动关闭连接。此外,如果它失败并崩溃,它还会关闭连接吗?
HttpClient.newHttpClient().send(
HttpRequest.newBuilder()
.uri(URI.create("url_website"))
.timeout(Duration.ofSeconds(5))
.GET()
.build(),
HttpResponse.BodyHandlers.ofString())
.body()