/// <summary> /// 通过POST方式访问接口 /// </summary> /// <param name="address">接口地址</param> /// <param name="methodName">接口方法</param> /// <param name="parameters">参数</param> /// <returns></returns> public static AgilePDAEntity Post(string address, AgilePDAMethod methodName, string parameters = "") { var url = address.TrimEnd('/') + "/" + methodName.ToString(); var html = AgileRequest.GetHtml(url, AgileEncoding.Default, 1000, AgileHttpActionType.Post, parameters); return(ParseEntity(html)); }
/// <summary> /// 通过GET方式访问接口 /// </summary> /// <param name="address">接口地址</param> /// <param name="methodName">接口方法</param> /// <param name="parameters">参数</param> /// <returns></returns> public static AgilePDAEntity Get(string address, AgilePDAMethod methodName, string parameters = "") { var url = address.TrimEnd('/') + "/" + methodName.ToString() + (string.IsNullOrWhiteSpace(parameters) ? "" : "?" + parameters); var html = AgileRequest.GetHtml(url); return(ParseEntity(html)); }