-
StackOverflow 文档
-
web-services 教程
-
使用 C#.net 和 Xamarin 应用程序开发以编程方式调用 Web 服务
-
使用输出的 Web 服务调用作为 IEnumerator 对象
/// <summary>
/// Post Method with Input/ data to post in JSON format Or you can send dictionary as shown in previous methods
/// </summary>
/// <returns> Json formated data </returns>
public void GetJsonData4()
{
IOperations _Obj = ClsOperations.GetOperations();
string url = "http://1.2.3.4:1234/Services/rest/CallService/WebRequest/";
string inputjson = "{\"@FirstParameter\": \"Value1\",\"@SecondParameter\": \"Value2\",\"@ThirdParameter\": \"Value3\"}";
string jsonResult = _Obj.GetJsonResult(url, null, inputjson);
IEnumerator objIEnumerator = _Obj.GetJsonEnumerableResult(jsonResult);
// you can perform further operations on it
}