c# 获取请求内容

 

c# 获取请求内容

var requestData = "";

var stream = HttpContext.Current.Request.InputStream;
stream.Position = 0;
using (var streamReader = new StreamReader(stream, Encoding.UTF8))
{
requestData = streamReader.ReadToEndAsync().Result;

stream.Position = 0;
}

posted @ 2021-10-28 08:42  临时工~  阅读(433)  评论(0编辑  收藏  举报