【发布时间】:2012-03-28 11:52:22
【问题描述】:
我有一个公开休息端点的 wcf 服务。我想使用提琴手对其进行测试。我有这样的方法:
[WebInvoke(Method = "POST", UriTemplate = "EditContact", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
string EditContact(string idContact, Contact Contact);
我输入:
POST http://192.168.1.31/ContactLibrary2.0/Service.svc/rest/DeleteContactHTTP/1.1
User-Agent: Fiddler
Host: 192.168.1.31
Content-Type : application/json; Charset=UTF-8
{
"idContact":"67697",
"firstName":"6767",
"lastName":"afdgsg",
"email":"dfghdfdb",
"age":"120",
"street":"sdf",
"city":"dfghgfhjhdfgsdv",
"country":"sdfsd"
}
您可以查看我项目中的更多代码:HERE
我收到 http 400 错误(错误请求错误)。想法?
【问题讨论】: