Web Api学习一

接触WebApi读的第一篇文章: ASP.NET Web API(一):使用初探,GET和POST数据

实践过程中,用的Fiddler模拟Post请求时收到的对象总是为空null

解决:将文章中的内容改为了如下:

User-Agent: Fiddler
Host: localhost:52404
Content-Type: application/json; charset=utf-8
Content-Length: 45

Request Body:

{"UserName":"u4","Password":"p4","Mail":"m4"} 不能有[]

原文地址:https://www.cnblogs.com/lxp-ontheroad/p/3885055.html