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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetResponseBody(org.apache.hc.core5.http.ClassicHttpResponse response) Little helper to extract a string from, reading frominvalid reference
HttpResponse#getEntity()HttpEntity.getContent().
-
Constructor Details
-
ServletUtils
public ServletUtils()
-
-
Method Details
-
getResponseBody
Little helper to extract a string from, reading frominvalid reference
HttpResponse#getEntity()HttpEntity.getContent().- Returns:
- the response body, or the empty string, if response's entity is null. TODO: write a test.
-