1.简单请求
[HttpGet]
public ActionResult Get(int id)
Postman: api / controller / action?id=1
2.form-data
[HttpPost]
public void Post([FromForm] string param)
Postman: api / controller / action
选form-datat:以key-value形式传值
3.json
[HttpPost]
public void Post([FromBody] JObject json)
Postman: api / controller / action
选 raw JSON
{
"id":"123"
}