PUT


P-PUT-Update

Replaces all the current representations of the target resource with the uploaded content.

public HttpResponseMessage Put(Product product)

{

if (ModelState.IsValid)

{

// Do something with the product (not shown).

return new HttpResponseMessage(HttpStatusCode.OK);

}

else

{

return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);

}

}