public void Configuration(IAppBuilder appBuilder)
        {
            var config = new HttpConfiguration();
            config.MapHttpAttributeRoutes();

            var jsonpFormatter = new JsonpMediaTypeFormatter(config.Formatters.JsonFormatter);
            config.Formatters.Insert(0, jsonpFormatter);

            appBuilder.UseWebApi(config);
        }
Exemple #2
0
        public void Configuration(IAppBuilder appBuilder)
        {
            var config = new HttpConfiguration();

            config.MapHttpAttributeRoutes();

            var jsonpFormatter = new JsonpMediaTypeFormatter(config.Formatters.JsonFormatter);

            config.Formatters.Insert(0, jsonpFormatter);

            appBuilder.UseWebApi(config);
        }