close
轉載:[The Will Will Web] 如何讓 ASP.NET Web API 無論任何要求都回應 JSON 格式
// 須加入參考:「System.Net.Http.Formatting」、「System.Net.Http」.
protected void Application_Start(object sender, EventArgs e)
{ GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); // 加入這一行.
}
文章標籤
全站熱搜
留言列表