当您使用REST';是webinvoke还是webget
本文关键字:webinvoke 还是 webget REST | 更新日期: 2023-09-27 17:57:32
[WebInvoke(UriTemplate = "/GetContent", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public List<Content> GetContent(string path) {
return Utility.GetContent(path);
}
[OperationContract]
[WebInvoke(UriTemplate = "/GetContent", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public List<Content> GetContent(string path) {
return Utility.GetContent(path);
}
这两种方法的作用相同还是有所不同?看起来它们都适用于我。