我可以像这样做吗?
[OperationContract]
[WebInvoke
(
Method = "POST",
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/abc{integerParam}"
)
]
ResultStruct abc( int integerParam, CustomClass secondParam );
这里的想法是我可以在URL中传递第一个参数(整数),但第二个参数来自POST。这是否可能?
我从WCF REST开始,不确定参数如何分配。任何指针都将有所帮助,谢谢。