c# - webapi restful routing not working -
i have web api route:
config.routes.maphttproute( name: "customersearchapi", routetemplate: "api/{controller}/{action}/{criteria}", defaults: new { criteria = routeparameter.optional }); this works:
http://localhost/api/customersearch/search?criteria=sdasd this not:
http://localhost/api/customersearch/search/sdasd this customersearchcontroller signature:
[httpget] public httpresponsemessage search(string criteria) can please tell me why?
c# rest routing
No comments:
Post a Comment