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