对于Post请求在BaseController中读取数据后,发现在具体的要实现的Action中读取到的数据为空
原因是读取完成之后没有回到原始的位置
最后一句代码:至关重要
httpContext.Request.InputStream.Seek(0, SeekOrigin.Begin);
byte[] byts = new byte[httpContext.Request.InputStream.Length];
httpContext.Request.InputStream.Read(byts, 0, byts.Length);
requestData = Encoding.UTF8.GetString(byts);
httpContext.Request.InputStream.Seek(0, SeekOrigin.Begin);