我有一個(gè)帶有某些測試功能的.net Core 2 API設(shè)置。(Visual Studio 2017)使用郵遞員,我將原始數(shù)據(jù)發(fā)布到該方法,但是模型只是空白?為什么? // POST api/Product/test [HttpPost] [Route("test")] public object test(MyTestModel model) { try { var a = model.SomeTestParam; return Ok("Yey"); } catch (Exception ex) { return BadRequest(new { message = ex.Message }); } } public class MyTestModel { public int SomeTestParam { get; set; } }
- 2 回答
- 0 關(guān)注
- 973 瀏覽
添加回答
舉報(bào)
0/150
提交
取消