private ResponseEntity<InputStreamResource> getResponse(String result) {
    ResultModel commandResult = ResultModel.fromJson(result);
    if (commandResult.getStatus().equals(Result.Status.OK)
        && commandResult.getFileToDownload() != null) {
      return getFileDownloadResponse(commandResult);
    } else {
      return getJsonResponse(result);
    }
  }
The ShellCommandsController class implements GemFire REST API calls for Gfsh Shell Commands.

@see org.springframework.stereotype.Controller
@see org.springframework.web.bind.annotation.RequestBody
@see org.springframework.web.bind.annotation.RequestMapping
@see org.springframework.web.bind.annotation.RequestMethod
@see org.springframework.web.bind.annotation.RequestParam
@see org.springframework.web.bind.annotation.ResponseBody
@since GemFire 8.0
geode-web/src/main/java/org/apache/geode/management/internal/web/controllers/ShellCommandsController.java