From 16604a593202f2f87adf71abd57d036fe7da3b52 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 18 十一月 2019 10:39:42 +0800 Subject: [PATCH] 同步了全部的代码 --- ZigbeeApp/Shared/Common/CommonPage.cs | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index 325dccd..4dee823 100755 --- a/ZigbeeApp/Shared/Common/CommonPage.cs +++ b/ZigbeeApp/Shared/Common/CommonPage.cs @@ -57,7 +57,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string CodeIDString = "1.0.19111201"; + public static string CodeIDString = "1.0.19111401"; /// <summary> /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee) /// </summary> @@ -268,7 +268,7 @@ /// <param name="token">token</param> /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param> /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns> - private async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST") + public async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST") { try { @@ -279,7 +279,11 @@ //2锛� 鍒濆鍖朒ttpWebRequest瀵硅薄 webRequest.Method = requestMethod; webRequest.Timeout = 10 * 1000; - webRequest.Headers.Add(HttpRequestHeader.Authorization, token); + if (token != null) + { + //瀵瑰簲寰俊缃戝潃 + webRequest.Headers.Add(HttpRequestHeader.Authorization, token); + } if (requestMethod == "GET") { //webRequest.ContentType = "text/html"; -- Gitblit v1.8.0