public ActionResult Command(string url, JObject rawCommand) { Ensure.NotNullOrEmpty(url, "url"); Ensure.NotNull(rawCommand, "rawCommand"); Type type = commandMapper.FindTypeByUrl(url); return(Command(rawCommand.ToString(), type)); }
public ActionResult Command(string url, [FromBody] string payload) { Ensure.NotNullOrEmpty(url, "url"); Ensure.NotNullOrEmpty(payload, "payload"); Type type = commandMapper.FindTypeByUrl(url); return(Command(payload, type)); }