陈嘉乐
2020-07-09 a7e8f9ea1b9d0b9c8e9c09a8101e65c59a475465
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
old mode 100755 new mode 100644
@@ -1236,12 +1236,16 @@
        /// <param name="method">请求方式为POST/GET</param>
        /// <param name="second">超时时间</param>
        /// <returns></returns>
        public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3)
        public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3, bool _bool = false)
        {
            HttpWebRequest request = WebRequest.Create(getUrl) as HttpWebRequest; //创建请求
            request.Method = method; //请求方式为POST/GET
            request.ContentType = "application/json";
            request.ContentType = "application/json";
            request.Timeout = second * 1000;//超时时间
            if (_bool) {
                //用于高胜可视对讲接口
                request.Headers.Add("Authorization", Config.Instance.Token);
            }
            if (method == "POST")
            {
                byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str);
@@ -1360,6 +1364,6 @@
            deviceConditionsInfo.Add(Key, Value);
        }
    }
}