2013-07-19 97 views

回答

0

您可以使用(前)RESTClient實現ftom restsharp

_restClient = new RestClient(); 
var request = new RestRequest(url) { Method = Method.POST }; 
request.AddHeader("content-type", "application/json"); 
request.RequestFormat = DataFormat.Json; 
request.AddParameter("json", YOUR_JSON, ParameterType.GetOrPost); 
request.Timeout = DEFAULT_TIMEOUT; 
_restClient.Timeout = Constants.DEFAULT_TIMEOUT; 
_restClient.ExecuteAsync(request, response => 
{ 
      // check response here 
}); 
+0

當我嘗試顯示響應CONTENTLENGTH,結果= 0 – Adnane