[HttpPost] public IHttpActionResult GetByUsername(string username) { return Ok(_userBusinessComponent.GetUserByUsername(username)); }
username 通过以下方式执行此操作: Postman
username
Postman
本人将行动签名更改如下:
public IHttpActionResult GetByUsername([FromBody]string username)
这次用户名总是空的!!!
像 ibubi
ibubi
我必须使用以下代码:
http://localhost:51671/api/User/GetByUsername?username=Mohaââmmad