mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:43:26 +08:00
## 0.0.2(2021-12-30)
使用SixLabors.ImageSharp替换System.Drawing,全面拥抱跨平台,减少安装libgdiplus的过程。组件功能更加丰富。 升级uview至2.0.19版本。进一步减小包大小。 取消全部WebRequest,替换为HttpClient。 nuget更新大批组件升级到6.0版本
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms.Net *
|
||||
* Web: https://CoreCms.Net *
|
||||
* ProjectName: 核心内容管理系统 *
|
||||
* Author: 大灰灰 *
|
||||
* Email: JianWeie@163.com *
|
||||
* CreateTime: 2020-05-12 0:54:53
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
|
||||
namespace CoreCms.Net.Utility.Helper
|
||||
{
|
||||
/// <summary>
|
||||
/// 模拟标准表单Post提交
|
||||
/// </summary>
|
||||
public static class HttpHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 模拟标准表单Post提交
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="postdate"></param>
|
||||
/// <returns></returns>
|
||||
public static string PostSend(string url, string postdate)
|
||||
{
|
||||
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
|
||||
myHttpWebRequest.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
|
||||
myHttpWebRequest.Method = "POST";
|
||||
Stream myRequestStream = myHttpWebRequest.GetRequestStream();
|
||||
StreamWriter myStreamWriter = new StreamWriter(myRequestStream);
|
||||
myStreamWriter.Write(postdate);
|
||||
myStreamWriter.Flush();
|
||||
myStreamWriter.Close();
|
||||
myRequestStream.Close();
|
||||
|
||||
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
|
||||
Stream myResponseStream = myHttpWebResponse.GetResponseStream();
|
||||
StreamReader myStreamReader = new StreamReader(myResponseStream, Encoding.GetEncoding("utf-8"));
|
||||
String outdata = myStreamReader.ReadToEnd();
|
||||
myStreamReader.Close();
|
||||
myResponseStream.Close();
|
||||
return outdata;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user