如何将Json对象从Fiddler传递给Webapi2 [英] How Do I Pass Json Object From Fiddler To Webapi2

查看:64
本文介绍了如何将Json对象从Fiddler传递给Webapi2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

fiddler post



fiddler post

http://localhost:15641/api/Complaints/NewComplaints
<pre lang="vb">User-Agent: Fiddler
Content-Type: application/json
Host: localhost:15641
Content-Length: 63</pre>





RequestBody



RequestBody

{
"CostCentre": "test"
"ComplaintText":"this is test complaint"
}







WebApi控制器






WebApi Controller

[Route("api/Complaints/NewComplaints")]

        [HttpPost]
        public void CreateNewComplaint(BLL.Complaint complaint)
        {
            //call BLL Create complaint method
        }


      }







我的对象是空值

我在哪里做错了?

i在控制器上放置断点投诉对象设置为所有空值

如果我没有传递值投诉对象它自己是空的

我怎样才能传递对象




my object is with null values
where am i doing wrong ?
i put breakpoints on controller the complaint object is set with all null values
if i don't pass the values complaint object it self is null
how can i pass the object

推荐答案

你应该试试Adonnced rest client as addon in google chrom e。

它更友好,可以帮助你。
You should try Adavnced rest client available as addon In google chrome.
it is more user friendly and might help you here.


这篇关于如何将Json对象从Fiddler传递给Webapi2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆