[HttpPost]
public async Task<IActionResult> testpost([FromForm] object info)
{
//Postman工具测试结果:
//FromBody,Postman的body只有=raw+json时才进的来
//参数为空时,Body(form-data、x-www-form-urlencoded)解析到的数据也有所不同
Dictionary<string,object> parmsVals=new Dictionary<string,object>();
try
{
if (HttpContext.Request.Body != null)
{
Stream _stream = HttpContext.Request.Body;
//_stream.Position = 0;
using (StreamReader reader = new StreamReader(_stream, Encoding.UTF8))
{
string strv = await reader.ReadToEndAsync();
&n

最低0.47元/天 解锁文章
897

被折叠的 条评论
为什么被折叠?



