且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

HTTP POST在OWIN自托管Web API中不起作用

更新时间:2023-02-15 23:15:43

我遇到了同样的问题,发现有必要在方法参数之前使用[FromBody]属性.在这种情况下,它可以解析请求有效负载,并且您可以访问方法

I've got the same issue and found that it is necessary to use [FromBody] attribute before your method params. In this case it can parse request payload and you can reach your methods

希望有帮助