private void RemoveTopicRequest() { Post("/deleteTopic", param => { var publisherIDString = GetQueryValueFromKey("id"); var topicName = GetQueryValueFromKey("topicName"); int publisherID; if (int.TryParse(publisherIDString, out publisherID)) { if (topicName.Length > 0 && Broker.RemoveTopic(publisherID, topicName)) { return(GetSuccessJSONMessage($"Topic {topicName} successfully removed")); } } return(GetFailureJSONMessage($"Topic {topicName} could not be removed")); }); }