JsonRequestBehavior.AllowGet 方便浏览器调试

        [HttpGet]
        public ActionResult getCoversationList(int CustomerId)
        {
            // 获取用户相关的聊天数据,包括个人,群,系统(可以单独获取)


            return Json(new { result = true, info = "", msg = "操作成功" }, JsonRequestBehavior.AllowGet); // 允许get
        }

设置成JsonRequestBehavior.AllowGet。可以断点调试,可以浏览器看到json数据。
不需要通过PostMan返回数据了。
调试好之后,将接口重新设置为HttpPost即可。

posted @ 2017-06-21 14:14  TBHacker  阅读(941)  评论(0编辑  收藏  举报