In a Web Apì project, I would like to use something like:
POST/mycontroller/1
but also POST/mycontroller/1?user=john
It is easy with GET because the framework routes correctly to each function. However, when I use POST, it does not work. I have 2 POST functions in the same controller. For example:
void Post(int id, string content)
and
void Post(int id, string content, string user)
I would hope when I call POST/mycontroller/1?user=john, the framework routes to Post(int id, string content, string user)
I know that I can use binding models, doing a model class and one unique POST function, but it is a mess because I have many functions and I would like to be able to use the query parameters to route the correct function. Is it possible?