JsonRequestBehavior.AllowGet 方便浏览器调试
2023-09-27 14:24:30 时间
[HttpGet]
public ActionResult getCoversationList(int CustomerId)
{
// 获取用户相关的聊天数据,包括个人,群,系统(可以单独获取)
return Json(new { result = true, info = "", msg = "操作成功" }, JsonRequestBehavior.AllowGet); // 允许get
}
设置成JsonRequestBehavior.AllowGet。可以断点调试,可以浏览器看到json数据。
不需要通过PostMan返回数据了。
调试好之后,将接口重新设置为HttpPost即可。
相关文章
- iOS10屏蔽系统调试打印Log
- xcode 真机调试 failed to get the task for process xxx
- 浏览器debug 调试一打开 Nginx 就 504 Gateway Time-out
- ESP-12F模块转接板测试版调试说明,下载MicroPython程序。ESP8266-12F
- 前端页面调试小技巧(谷歌浏览器)
- 在 Linux 中如何使用 gdb 调试 C 程序
- chrome 浏览器设置字体大小,方便调试
- Unity3D实践系列03,使用Visual Studio编写脚本与调试
- Ubuntu 16.04下GDB调试
- 《Effective Debugging:软件和系统调试的66个有效方法》——第1章 宏观策略 第1条:通过事务追踪系统处理所有的问题
- js--调试常用语句
- 浏览器端如何使用VConsole.js调试代码?
- vue的调试工具 vue-devtools 的安装和使用
- API & HTTP请求调试插件(Postman)
- VS2013远程调试IIS中的网站
- GDB调试
- 《软件调试艺术》读后感一
- 浏览器开发调试工具的秘密 - Secrets of the Browser Developer Tools
- usb芯片调试经验