好吧,让我说我想用POSTMAN或任何其他Rest服务客户端工具来调用我的代码,我该怎么做呢?我的一个参数“数据”是巨大的,我不要想在URL中包含“数据”或有效载荷,我想从身体调用它?如何使用POSTMAN或任何客户端工具应用程序调用RestFul WCF POST服务?
下面是实际的代码
[OperationContract(Name = "createNewSurvey")]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "post/createNewSurvey")]
string CreateNewSurvey(string id, string Data);
public string CreateNewSurvey(string id, [FromBody]string Data)
{
//do somethoinf
return data;
}
任何帮助,将不胜感激它
感谢
为什么没有邮递员? –