@PostMapping("")
    public @ResponseBody TubeMQResult clusterMethodProxy(@RequestParam String method, @RequestBody String req) {
        if (!isValidMethod(method)) {
            LOGGER.warn("Invalid method value received: {}", method);
            return TubeMQResult.errorResult("Invalid method value.");
        }

        if (!isValidURL(req)) {
            LOGGER.warn("Invalid URL format received: {}", req);
            return TubeMQResult.errorResult("Invalid URL format.");
        }

        return processClusterRequest(method, req);
    }
Handles cluster-related requests based on the specified method.

@param method The method to perform (e.g., "add", "delete", "modify", "switch")
@param req    The request body containing relevant data
@return A TubeMQResult indicating the result of the operation
inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/controller/cluster/ClusterController.java