code: public static void doPost(HttpServletRequest request, HttpServletResponse response)
        throws IOException {
      String handler = getHandler(request);
      if (handler.startsWith(CONTROLLER_PATH)) {
        if (!checkForTaskQueue(request, response)) {
          return;
        }
        new ShardedJobRunner<>().completeShard(
            checkNotNull(request.getParameter(JOB_ID_PARAM), "Null job id"),
            checkNotNull(request.getParameter(TASK_ID_PARAM), "Null task id"));
      } else if (handler.startsWith(WORKER_PATH)) {
        if (!checkForTaskQueue(request, response)) {
          return;
        }
        new ShardedJobRunner<>().runTask(
            checkNotNull(request.getParameter(JOB_ID_PARAM), "Null job id"),
            checkNotNull(request.getParameter(TASK_ID_PARAM), "Null task id"),
            Integer.parseInt(request.getParameter(SEQUENCE_NUMBER_PARAM)));
      } else if (handler.startsWith(COMMAND_PATH)) {
        if (!checkForAjax(request, response)) {
          return;
        }
        StatusHandler.handleCommand(handler.substring(COMMAND_PATH.length() + 1), request, response);
      } else {
        throw new RuntimeException(
            "Received an unknown MapReduce request handler. See logs for more detail.");
      }
    }
docs: Handle POST http requests.