0
我想讓Android使用我自己製作的簡單WCF web服務。這裏是我的WCF服務的定義:如何將JSON HTTP請求POST到WCF製作的RESTful API
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/UploadCallLog2")]
[OperationContract]
String UploadCallLog2(String number, String cached_name, String duration, String date, String line_number);
我有兩個問題:1。 ,應該怎麼我的HTTP請求樣子?添加請求標題時應該選擇什麼樣的內容類型? 2.是否有正確的方式將輸入參數作爲JSON放在body中,並且webservice可以自動檢測輸入參數的值?
Fred