asp.net web api - webapi route with controller and action -


default webapi route - api/{controller}/{id}

in realtime scenrios may require more , post methods

is recommended change default routing - api/{controller}/{action}/{id}

usually default values recommended values. don't need change unless have special requirements.

api/{controller}/{controller}/{id} non-sense because don't have display 2 times name of controller in url.

{action} not everytime needed (if use of get/put...). may want create api/{controller}/{action}/{id} second route or specify {action} in default route urlparameter.optional.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -