code: public CommandOutput<?, ?> getResponse(List<Command> cmds) throws RestApiProcessingException {
      String url = cmds.get(0).getParams().get(0);
  
      log.info("URL: " + url);
      String jsonStr = null;
      HttpRequestBase httpRequest = new HttpGet(url);
      addHeaders(httpRequest);
      HttpEntity httpEntity = null;
      HttpResponse httpResponse = null;
      try {
        httpResponse = this.httpClient.execute(httpRequest);
        StatusLine status = httpResponse.getStatusLine();
        httpEntity = httpResponse.getEntity();
  
        if (httpEntity != null) {
          jsonStr = EntityUtils.toString(httpEntity);
        }
  
        if (status.getStatusCode() >= 400) {
          log.info("Unable to get response using: " + url);
          JsonElement jsonRet = GSON.fromJson(jsonStr, JsonArray.class);
          throw new RestApiProcessingException(getFirstErrorMessage("Failed to retrieve response from", jsonRet));
        }
      } catch (Exception e) {
        throw new RestApiProcessingException("Failed to process rest api request; error - " + e.getMessage(), e);
      } finally {
        try {
          if (httpEntity != null) {
            EntityUtils.consume(httpEntity);
          }
          // httpResponse.close();
        } catch (Exception e) {
          throw new RestApiProcessingException("Failed to consume httpEntity; error - " + e.getMessage(), e);
        }
      }
      CommandOutput<RestApiCommand, String> output = new RestApiCommandOutput();
      output.put((RestApiCommand) cmds.get(0), jsonStr);
      return output;
    }
docs: get http response in json format using url
  @return json string with the response