阅读背景:

使用HttpClient和Web API方法[FromBody]参数发布到Web API最终为null

来源:互联网 

I am attempting to POST to a Web API using the HttpClient. When I put a breakpoint in the Save method of the Web API the [FromBody] Product is null. This means that something is wrong with the way I am posting the product over to the Web API. Can someone please take a look at the below code and see where I might be going wrong. I am assuming it is something to do with headers and content types.I am attempting to POST to a Web API using the




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: