I\'m having a problem with this technology,
I already have created a entry in my web api controller that allows me to create users:
public IHttpActionR
You should add attributes to your method, as such:
public IHttpActionResult PutUser(int id, [FromBody] User user)
This indicates the user
parameter is received from the request body. Next, you can use the following URL:
http://localhost:15423/api/users?id=
And in favor of full on REST use, if you add [FromUri]
to the id
parameter, and a [Route("{id}")]
to the method, you could use:
http://localhost:15423/api/users/5
Where 5
can be replaced by your id.
(Both requests should include the User
object in the body)