From 1d5e384497c7059e09760628dab3e83eb88f97ae Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 04 十二月 2020 17:48:34 +0800 Subject: [PATCH] 2020-12-04-4 --- HDL_ON/DAL/Server/HttpUtil.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 0fa2299..0e405b0 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -208,6 +208,7 @@ { try { + ResponsePackNew revertObj = new ResponsePackNew() { }; revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponsePackNew>(response.Content); //*****涓�浜涘垽绌哄鐞�***************** @@ -422,6 +423,38 @@ } /// <summary> + /// 涓嬭浇鏂囦欢 璇锋眰鏈嶅姟鍣ㄦ柟娉� + /// </summary> + /// <param name="apiPath"></param> + /// <param name="bodyParameterJson"></param> + /// <param name="queryDictionary"></param> + /// <param name="urlHead"></param> + /// <param name="replaceToken"></param> + /// <param name="mTimeout"></param> + /// <returns></returns> + public static byte[] HttpsDownload(string requestFullUrl, int mTimeout = 30) + { + #region RestRequest + try + { + RestClient client = new RestClient(requestFullUrl); + RestRequest request = new RestRequest(Method.GET); + request.Timeout = mTimeout * 1000; + + IRestResponse response = client.Execute(request); + return response.RawBytes; + } + catch (Exception ex) + { + HDL_ON.Utlis.WriteLine(ex.Message); + return null; + } + #endregion + + } + + + /// <summary> /// /// </summary> const string APP_KEY = "HDL-HOME-APP-TEST"; -- Gitblit v1.8.0