我有一組允許JSON格式進行消息交換的WCF服務。JSON服務傳遞空/空字符串參數值
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, UriTemplate = "SearchStores/{accountId}/{storeName}")]
public IList<Store> SearchStores(string accountId, string storeName)
如何將空/空的storeName傳遞給方法?如果我使用下面的url來調用該方法,我得到404未找到錯誤。
服務器名稱:端口/爲MyService/SearchStores/1/
請建議表示感謝。
字母「空」,不帶引號,表示在JSON空值。當然,無論你在說什麼都能接受是另一回事。 –