1
我寫了一個API使用這種格式:錯誤:方法在REST不允許WCF阿比
[OperationContract]
[WebInvoke(Method = "Get", UriTemplate = "/GetPrice/{ItemID}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
string GetVegatablePrice(string ItemID);
我得到了一個錯誤:
method not allowed
如果你的答案是值得分享,發佈它作爲答案。 – aaron
我們可以使用WCF創建Rest api嗎?根據我的知識,我們可以創建SOAP API,它使用WCF服務返回xml值。如果我錯了,請糾正我 –
@Prasadtelkikar我們可以使用WCF創建REST和SOAP API – Vinoth