code: private String executeScriptGetValueRequest(String openCpuSessionKey) throws IOException {
      URI scriptGetValueResponseUri = getScriptGetValueResponseUri(openCpuSessionKey);
      HttpGet httpGet = new HttpGet(scriptGetValueResponseUri);
      String responseValue;
      try (CloseableHttpResponse response = httpClient.execute(httpGet)) {
        int statusCode = response.getStatusLine().getStatusCode();
        if (statusCode >= 200 && statusCode < 300) {
          HttpEntity entity = response.getEntity();
          responseValue = EntityUtils.toString(entity);
          EntityUtils.consume(entity);
        } else {
          throw new ClientProtocolException(format(FORMAT_UNEXPECTED_RESPONSE_STATUS, statusCode));
        }
      }
      return responseValue;
    }
docs: Retrieve and return R script STDOUT response using OpenCPU
  
  @param openCpuSessionKey OpenCPU session key
  @return R script STDOUT
  @throws IOException if error occured during script response retrieval