Request.EnableBuffering();
using (var reader = new StreamReader(Request.Body, encoding: Encoding.UTF8))
{
var body = reader.ReadToEndAsync();
// Do some processing with body…
// Reset the request body stream position so the next middleware can read it
Request.Body.Position = 0;
}
.netcore 获取请求内容
最新推荐文章于 2023-05-18 16:29:34 发布