asp.net web api - web api default action selector -
i have web api 1 in project. can't use web api 2. route config
config.routes.maphttproute( name: "images api", routetemplate: "api/objects/{objectid}/{controller}/{action}", defaults: new { controller = "images" });
i post request hit post action of imagescontroller (action named post), , request hit method named get. in both cases 404. i'm missing?
this solution:
config.routes.maphttproute( name: "images api", routetemplate: "api/objects/{objectid}/{controller}", defaults: new { controller = "images" });
just excluded action routetemplate.
Comments
Post a Comment