Class ServletUtils

java.lang.Object
uk.ac.ebi.utils.opt.net.ServletUtils

public class ServletUtils extends Object
Utilities about the HTTP protocol and the respective Java packages.
Author:
brandizi
Date:
4 May 2023
  • Constructor Details

    • ServletUtils

      public ServletUtils()
  • Method Details

    • getResponseBody

      public static String getResponseBody(org.apache.hc.core5.http.ClassicHttpResponse response)
      Little helper to extract a string from HttpResponse#getEntity(), reading from HttpEntity.getContent().
      Returns:
      the response body, or the empty string, if response's entity is null. TODO: write a test.