/// <summary> /// 提交delete请求,并返回json结果 /// </summary> /// <param name="url">提交eSight的url</param> /// <param name="isOpenAgain">重新打开连接,获取eSight openid</param> /// <returns>返回JObject的eSight返回结果</returns> private JObject HCDelete(string url, bool isOpenAgain) { if (isOpenAgain) { Open(); } string abUrl = GetFullURL(url); InitHCHead(); JObject retObj = null; try { for (int i = 0; i <= 1; i++) { LogUtil.HWLogger.API.DebugFormat("Send json by delete:{0}", abUrl); HttpResponseMessage hrm = HClient.DeleteAsync(abUrl).Result; retObj = HCCheckResult(abUrl, hrm); if (!string.Equals(GetJObjectPropVal <string>(retObj, "code"), Const.ConstMgr.ErrorCode.HW_LOGIN_AUTH)) { break; } else { if (isOpenAgain) { LogUtil.HWLogger.API.WarnFormat("Login agin,Retry.."); TryOpen(); } else { break; } } } } catch (System.AggregateException ae) { HandleException(ae); } return(retObj); }