Is it possible to look at the body of the http method and the fact it is POST (verb) call a different method on the same controller?
So I need something like this:
void
[HttpPost]
public HttpResponseMessage DeleteItem(DeleteItemCommand deleteItemCommand)
{
return null;
}
[HttpPost]
public HttpResponseMessage UpdateItem(UpdateItemCommand updateItemCommand)
{
return null;
}
and this all works with a single URL : [Route("api/controller")].
So in Javascript my call will have in the body something like:
{
DeleteItemCommand : {
etc.
}
}
or even use a HTTP header like domain-model="DeleteItemCommand".