您的位置:首页 > 其它

使用Fiddler工具调试RESTFul WCF 服务的技巧及其问题

2012-09-06 08:56 441 查看
异常信息:

The incoming message has an unexpected message format ‘Raw’. The expected message formats for the operation are ‘Xml’, ‘Json’.

在使用Fiddler工具(可免费下载),测试RESTFul WCF 服务的POST方法时,出现了上述异常印象。

这时,记得需要在header中添加Content-Type指令,如下所示:

Content-Type: application/xml; charset=utf-8

或者Content-Type: text/xml

如果是传入JSON数据,则需要更改为:Content-Type: application/json; charset=utf-8



RESTFul WCF 服务返回结果:



参考链接:

免费抓包工具Fiddler的使用

REST 架构
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: