Package uk.ac.ebi.utils.opt.net
Class ServletUtils
java.lang.Object
uk.ac.ebi.utils.opt.net.ServletUtils
Utilities about the HTTP protocol and the respective Java packages.
- Author:
- brandizi
- Date:
- 4 May 2023
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getResponseBody
(org.apache.hc.core5.http.ClassicHttpResponse response) Little helper to extract a string fromHttpResponse#getEntity()
, reading fromHttpEntity.getContent()
.
-
Constructor Details
-
ServletUtils
public ServletUtils()
-
-
Method Details
-
getResponseBody
Little helper to extract a string fromHttpResponse#getEntity()
, reading fromHttpEntity.getContent()
.- Returns:
- the response body, or the empty string, if response's entity is null. TODO: write a test.
-