标签:
传递一个json对象发post请求案例:
1.打开Fiddler,点击Composer选项卡
2.下拉框选择Post
3.输入请求的URL,比如:http://localhost:49194/api/user/
4.Request Headers中输入:
Content-Type: application/json; charset=utf-8
Content-Length: 398 (这个是你要和你请求正文的字符长度一致,可以不输入,自动计算)
5.输入,Requst Boy,比如:
{"UserName":"logic5","Password":"Test1234","FirstName":"Ivan","LastName":"Chen","LastLoginDate":"2010-01-01","Email":"ivan.chen@logicsolutions.com","CreateDate":"2010-01-01","LastPasswordChangedDate":"2010-01-01","LastLockoutDate":"2010-01-01","IsLockedOut":true,"IsApproved":false,"DisableDate":"2010-01-01","IsDisable":false,"profile":{"TINs":"743222298","ProviderId":168829,"UserName":"logic5"}}
点击Execute,操作成功!
标签:
原文地址:http://www.cnblogs.com/vipsoft/p/4338463.html