code: private String executeScriptGetResponseRequest(
        String openCpuSessionKey, String scriptOutputFilename, String outputPathname)
        throws IOException {
      String responseValue;
      if (scriptOutputFilename != null) {
        executeScriptGetFileRequest(openCpuSessionKey, scriptOutputFilename, outputPathname);
        responseValue = null;
      } else {
        responseValue = executeScriptGetValueRequest(openCpuSessionKey);
      }
      return responseValue;
    }
docs: Retrieve R script response using OpenCPU
  
  @param openCpuSessionKey OpenCPU session key
  @param scriptOutputFilename R script output filename (can be null)
  @param outputPathname output pathname (can be null)
  @return response value or null if scriptOutputFilename is not null
  @throws IOException if error occured during script response retrieval