diff --git a/插件库/Lskj.Util/HttpHelper.cs b/插件库/Lskj.Util/HttpHelper.cs index 9832141..8ca1d92 100644 --- a/插件库/Lskj.Util/HttpHelper.cs +++ b/插件库/Lskj.Util/HttpHelper.cs @@ -66,6 +66,7 @@ namespace Lskj.Util byteRequest = Encoding.UTF8.GetBytes(postData); break; } + httpWebRequest.ContentLength = byteRequest.Length; } else if (pmsDic != null) { @@ -87,8 +88,8 @@ namespace Lskj.Util byteRequest = Encoding.UTF8.GetBytes(builder.ToString()); break; } + httpWebRequest.ContentLength = byteRequest.Length; } - httpWebRequest.ContentLength = byteRequest.Length; Stream stream = httpWebRequest.GetRequestStream(); stream.Write(byteRequest, 0, byteRequest.Length); stream.Close(); diff --git a/插件库/Lskj.Util/UploadFileUtil.cs b/插件库/Lskj.Util/UploadFileUtil.cs index f363783..77792e1 100644 --- a/插件库/Lskj.Util/UploadFileUtil.cs +++ b/插件库/Lskj.Util/UploadFileUtil.cs @@ -75,7 +75,7 @@ namespace Lskj.Util HttpWebResponse webResponse = HttpHelper.Post(url, fileStream, null, headerDic, out result); if (webResponse != null && !string.IsNullOrEmpty(result)) { - JObject jsonObject = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(result); + JObject jsonObject = (JObject)JsonConvert.DeserializeObject(result); string isSuccess = jsonObject["success"] + ""; if (isSuccess.Equals("True", StringComparison.CurrentCultureIgnoreCase)) { @@ -112,8 +112,6 @@ namespace Lskj.Util /// /// /// - /// - /// /// /// public static bool DeleteFile(string token, string url, out string returnMsg)