I have created a webApi that automatically created som methods for me. That Put-Method got created like this:
// PUT: api/Actor/5
[ResponseType(typeof(void))]
public async Task<IHttpActionResult> PutActor(int id, Actor actor)
{
//Code that updates the actor
}
But How can i call this method? Im thinking that it must start with:
HttpResponseMessage response = client.PutAsJsonAsync("api/Actors/") <-How can i add the two params?
According to some posts you cant do it without workarounds:
WebAPI Multiple Put/Post parameters
But it seems strange considering that the method got created to me automatically. Should be a standard way to do it no?