如何在.core (邮递员)中发布[FromBody](raw)中的json参数

我在.core 3项目中有一个方法[Post]。以及:我将使用带有10个json参数的post:

[
  {
    "os": "android",
    "type": "www",
    "versionCode": 123,
    "operand": "fofdr",
    "forceUpdate": false,
    "title": "dsfs",
    "message": "fdsf",
    "action": "act",
    "positiveButton": "btn1",
    "negativeButton": "test",
    "messageType": "sadad"
  }
]

和:

 [HttpPost]
        [Route("CreateStartMessage")]
        public IActionResult CreateStartMessage([FromBody] string os, string type, int versionCode, string operand, bool forceUpdate, string title,
            string message, string action, string positiveButton, string negativeButton,string messageType)
        {
            try
            {

             ...
                return Ok(resultApi);
            }



        }

如何将带有POSTMAN的json参数传递给此方法api?

转载请注明出处:http://www.kldfzc.com/article/20230526/1310708.html