WCF c#如何請求createUser?
例如
服務端
地址是:http://localhost/myService.svc
[OperationContract]
[WebInvoke(Method = "POST",
ResponseFormat = WebMessageFormat.Json,
UriTemplate = "CreateUsers")]
void CreateUsers(User user);
[DataContract]
public class User
{
[DataMember]
public string username { get; set; }
}
那在c#客戶端怎樣發送請求叫服務端執行CreateUsers(User user)? User這class在客戶端是不是要創建?
[最优解释]
http://blog.csdn.net/fangxinggood/article/details/6247297
[其他解释]
用 webcilent对象 UploadStringAsync方法