JsonRequestBehavior.AllowGet 方便浏览器调试
生活随笔
收集整理的這篇文章主要介紹了
JsonRequestBehavior.AllowGet 方便浏览器调试
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
[HttpGet]public ActionResult getCoversationList(int CustomerId){// 獲取用戶相關的聊天數據,包括個人,群,系統(可以單獨獲取)return Json(new { result = true, info = "", msg = "操作成功" }, JsonRequestBehavior.AllowGet); // 允許get}
設置成JsonRequestBehavior.AllowGet??梢詳帱c調試,可以瀏覽器看到json數據。
不需要通過PostMan返回數據了。
調試好之后,將接口重新設置為HttpPost即可。
總結
以上是生活随笔為你收集整理的JsonRequestBehavior.AllowGet 方便浏览器调试的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Tushare数据的绘图操作
- 下一篇: Nodejs前端服务器压缩图片