public Task CommandAsync(Type type, string payload) { string url = commandMapper.FindUrlByType(type); if (url != null) { return(http.PostJsonAsync($"/api/command/{url}", payload)); } else { return(http.PostJsonAsync($"/api/command", CreateRequest(type, payload))); } }