Net 6 C#, 为啥x-www-form-urlencoded类型传参,OnActionExecuting不触发呢?
Net 6 C#, 为啥postman 用x-www-form-urlencoded类型传参,后端 OnActionExecuting不触发呢? 谢谢!
回答
问题补充:
我这个自定义的过滤类(CustomActionFilterAttribute : ActionFilterAttribute),里面有四个方法,OnActionExecuting、OnActionExecuted、OnResultExecuting、OnResultExecuted,当用x-www-form-urlencoded类型传参,后端 OnActionExecuting不触发,这样就导致参数获取不到,自定义的方法也不会执行。
THE END
二维码