public void TestMethod1() { HttpPostHelper helper = new HttpPostHelper(); IDictionary <string, string> dic = new Dictionary <string, string>(); //dic.Add("code", "123456"); string err; JContainer json; helper.PostData("http://192.168.31.180:8080/child/registerDefend.do?code=123456", dic, out json, out err); if (json == null) { Debug.WriteLine(err); } else { Debug.WriteLine(json.ToString()); } }
public Tuple <string, string, string, string> GetChild(string code, string unitstr, out string err) { IDictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("code", code); dic.Add("yljgdm", unitstr); string url = _base.GetServiceUrl(URLEnum.registerDefend); JContainer jsonResult; _httpPostHelper.PostData(url, dic, out jsonResult, out err); if (jsonResult == null) { return(null); } return(this.ConvertJContainer(jsonResult, err)); }
public void TestMethodNetWorkGetList() { HttpPostHelper helper = new HttpPostHelper(); IDictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("yljgdm", "67613231-0"); string err; JContainer json; helper.PostData("http://192.168.31.180:8080/child/queryObservHz.do", dic, out json, out err); if (json == null) { Debug.WriteLine(err); } else { Debug.WriteLine(json.ToString()); } }
public void TestMethodChangeState() { HttpPostHelper helper = new HttpPostHelper(); IDictionary <string, string> dic = new Dictionary <string, string>(); dic.Add("username", "admin"); dic.Add("password", "123456"); string err; JContainer json; helper.PostData("http://192.168.31.180:8080/child/login.do", dic, out json, out err); if (json == null) { Debug.WriteLine(err); } else { Debug.WriteLine(json.ToString()); } }