public void TestMethod1() { NetWorkService netWorkService = new NetWorkService(); Dictionary <string, string> dic = new Dictionary <string, string>(); //dic.Add("message", "34343"); //dic.Add("type", "6767"); //dic.Add("level", "你78好"); string err; var str = netWorkService.Post("http://localhost:22889/PostMessage?message=你好&type=可以&level=还行", dic, false, out err); Debug.WriteLine(str); }
public void TestMethod1() { NetWorkService service = new NetWorkService(); Dictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("jgdm", "729818173"); string err; string url = "http://192.168.5.15:8080/register/countNum.do"; var result = service.Post(url, dic, out err); Debug.WriteLine(result.ToString()); string str = string.Empty; }
public void TestMethodPost() { NetWorkService httpPostHelper = new NetWorkService(); Dictionary <string, string> keyValuePairs = new Dictionary <string, string>(); keyValuePairs.Add("key", "chzhjkkj123456./"); keyValuePairs.Add("sn", "Z55693"); keyValuePairs.Add("startTime", "2019-04-01"); keyValuePairs.Add("endTime", "2019-04-11"); string err; string url = "http://121.40.75.174:7777/DaPaRe/FindPastRecordsData"; var result = httpPostHelper.Post(url, keyValuePairs, out err); Debug.WriteLine(result); string ss = result; }