.net c# 获取Post过来的数据流

。! / 2023-08-28 / 原文

private string GetStream()
{
Stream s = System.Web.HttpContext.Current.Request.InputStream;
byte[] b = new byte[s.Length];
s.Read(b, 0, (int)s.Length);
return Encoding.UTF8.GetString(b);
}