SVN r559
SVN-Revision: r559
This commit is contained in:
@@ -66,6 +66,7 @@ namespace Lskj.Util
|
|||||||
byteRequest = Encoding.UTF8.GetBytes(postData);
|
byteRequest = Encoding.UTF8.GetBytes(postData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
httpWebRequest.ContentLength = byteRequest.Length;
|
||||||
}
|
}
|
||||||
else if (pmsDic != null)
|
else if (pmsDic != null)
|
||||||
{
|
{
|
||||||
@@ -87,8 +88,8 @@ namespace Lskj.Util
|
|||||||
byteRequest = Encoding.UTF8.GetBytes(builder.ToString());
|
byteRequest = Encoding.UTF8.GetBytes(builder.ToString());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
httpWebRequest.ContentLength = byteRequest.Length;
|
||||||
}
|
}
|
||||||
httpWebRequest.ContentLength = byteRequest.Length;
|
|
||||||
Stream stream = httpWebRequest.GetRequestStream();
|
Stream stream = httpWebRequest.GetRequestStream();
|
||||||
stream.Write(byteRequest, 0, byteRequest.Length);
|
stream.Write(byteRequest, 0, byteRequest.Length);
|
||||||
stream.Close();
|
stream.Close();
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace Lskj.Util
|
|||||||
HttpWebResponse webResponse = HttpHelper.Post(url, fileStream, null, headerDic, out result);
|
HttpWebResponse webResponse = HttpHelper.Post(url, fileStream, null, headerDic, out result);
|
||||||
if (webResponse != null && !string.IsNullOrEmpty(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"] + "";
|
string isSuccess = jsonObject["success"] + "";
|
||||||
if (isSuccess.Equals("True", StringComparison.CurrentCultureIgnoreCase))
|
if (isSuccess.Equals("True", StringComparison.CurrentCultureIgnoreCase))
|
||||||
{
|
{
|
||||||
@@ -112,8 +112,6 @@ namespace Lskj.Util
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
/// <param name="fileStream"></param>
|
|
||||||
/// <param name="fileId"></param>
|
|
||||||
/// <param name="returnMsg"></param>
|
/// <param name="returnMsg"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static bool DeleteFile(string token, string url, out string returnMsg)
|
public static bool DeleteFile(string token, string url, out string returnMsg)
|
||||||
|
|||||||
Reference in New Issue
Block a user