I know you can alter the default behaviour of routing in Web API like this:
routes.MapHttpRoute(
name: "ActionApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
But can you
routes.MapHttpRoute(
name: "ActionApi",
routeTemplate: "api/{controller}?verb={action}",
defaults: new { action = RouteParameter.Optional }
);
Edit: The following route templates gives the following errors:
"api/{controller}?verb={action}"
throws a YSOD becaus of the ?-character
"api/{controller}%3Fverb={action}"
Throws the following
Multiple actions were found that match the request: GetRecord on type RouteConfigMedGet.Controllers.TestController ListRecords on type RouteConfigMedGet.Controllers.TestController