【发布时间】:2015-04-01 05:41:22
【问题描述】:
我有两种方法,比如在界面中
[OperationContract]
[WebInvoke(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
UriTemplate = "/InsertDetails/{FirstName}/{CustomerName}/{LastName}/{Address}",
Method = "PUT",
BodyStyle = WebMessageBodyStyle.Bare)]
void InsertDetails(string FirstName, string CustomerName, string LastName, string Address);
[OperationContract]
[WebInvoke(RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/Insert/",Method="PUT")]
void InsertDetailsData(CustomerClass custmer);
我想在 restclient 插件中测试这些方法... 如何在 InsertDetails 方法中传递参数。
【问题讨论】:
-
您可以创建一个代表您的
CustomerClass的 JSON 并将其添加到请求正文中。 -
对不起,我没有得到你.....请描述清楚
标签: c# wcf-rest rest-client