public async Task <HttpResponseMessage> Post([FromUri] int defaultAction = -1)
 {
     return(await DecisionUtil.ChooseAction(
                this.Request,
                "Policy",
                (telemetry, input) =>
     {
         var url = ConfigurationManager.AppSettings["DecisionServiceSettingsUrl"];
         var client = DecisionServiceClientFactory.AddOrGetExisting(url);
         return defaultAction != -1 ?
         client.ChooseAction(input.EventId, input.Context, defaultAction) :
         client.ChooseAction(input.EventId, input.Context);
     }));
 }
        public async Task <HttpResponseMessage> Post([FromUri] int[] defaultActions)
        {
            return(await DecisionUtil.ChooseAction(
                       this.Request,
                       "Ranker",
                       (telemetry, input) =>
            {
                var url = ConfigurationManager.AppSettings["DecisionServiceSettingsUrl"];
                var client = DecisionServiceClientFactory.AddOrGetExisting(url);
                var action = defaultActions != null && defaultActions.Length > 0 ?
                             client.ChooseRanking(input.EventId, input.Context, defaultActions) :
                             client.ChooseRanking(input.EventId, input.Context);

                return action;
            }));
        }