0
[OperationContract]
[WebInvoke(UriTemplate = "s={s}", Method = "POST")]
string EchoWithPost(string s);
我试图消耗使用WebRequest
这个方法(WCF服务):WCF WebInvoke POST邮件正文
WebRequest request1 = WebRequest.Create("http://MyIP/Host");
request1.Method = "POST";
request1.ContentType = "application/x-www-form-urlencoded";
string postData1 = "s=TestString";
我不想在URL中传递数据(s=TestString
)我想要做的是在消息体中传递数据。