I would like to have a PUT-method that i can call with:
localhost/api/editRole/id and pass post-data.
My route looks like this:
routeTemplate: "api/{controller}/{action}/{id}"
Then i tried the following method:
[HttpPut]
public bool editRole(int id, roleDTO postdata)
{
return dal.editRole(postdata);
}
but if i try to call localhost/api/editRole/2
with some post-data i get The requested resource does not support http method 'PUT
What am i doing wrong?