Asp.net core MVC post parameter always null

后端 未结 4 1005
一整个雨季
一整个雨季 2020-12-05 10:57

I am new to MVC core.

I have created a project with MVC core which has a controller. This controller has Get and Post action methods. If i pass data to Get method us

4条回答
  •  Happy的楠姐
    2020-12-05 11:41

    Are you on Microsoft.AspNetCore.Mvc 1.0.0?

    If you are, try sending this object as your body in a request (camel cased properties):

    {
       "name":"UserName",
       "gender":"Gender of the user",
       "phoneNumber":"PhoneNumber of the user"
    }
    

提交回复
热议问题