黄学彪
2020-07-13 23420922845c9e77019a55c3b3e3271eb1ec261e
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -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);