JAVA-10903: Rename HttpClient Modules to Apache HttpClient (#12070)

* JAVA-10903: rename httpclient to apache-httpclient

* JAVA-10903: rename httpclient-2 to apache-httpclient

* JAVA-10903: update main pom
This commit is contained in:
freelansam
2022-04-20 17:53:00 +05:30
committed by GitHub
parent 99f83564b6
commit c6c8cb4abd
39 changed files with 12 additions and 12 deletions
@@ -0,0 +1,26 @@
package com.baeldung.httpclient;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import java.io.IOException;
public final class ResponseUtil {
private ResponseUtil() {
}
public static void closeResponse(CloseableHttpResponse response) throws IOException {
if (response == null) {
return;
}
try {
final HttpEntity entity = response.getEntity();
if (entity != null) {
entity.getContent().close();
}
} finally {
response.close();
}
}
}