简体   繁体   中英

Dotnet core Api Post Request from Postman Error as The input was not valid

When im trying hitting from Postman Im Getting Error as The Input was Not Valied

[HttpPost("/InsertData")]
       // [Route("InsertData")]
        public async Task<IActionResult> InsertData([FromBody][FromForm] AbcInsert _Data)
        {
}

From PostMan Body As form-data Name:"--" And Header as Application/Json

use this

[HttpPost]
              [Route("InsertData")]
              public async Task<IActionResult> InsertData([FromForm]AbcInsert _Data)
              {    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM