webapi jsonp处理
jsonp只支持httpget请求。
[HttpGet] public ResultObject SubmitOrderJsonp(string gameAccount, string callback) { T_DTO_CardOrder.AddOrderRequest sOrder = new T_DTO_CardOrder.AddOrderRequest();var a = SubmitOrder(sOrder); return a; }
Global文件处理:
GlobalConfiguration.Configuration.AddJsonpFormatter(GlobalConfiguration.Configuration.Formatters.JsonFormatter, "callback");