ASP.NET MVC RESTFul architecture

时光怂恿深爱的人放手 提交于 2019-12-22 00:06:37

问题


Does ASP.NET MVC support RESTful architecture by default?

What I want to know is, if I want to develop a RESTful kind of project, need I to specially work anything on ASP.NET MVC or it will support this feature by default?


回答1:


If you use Controllers to represent resources and simply implement "actions" that are equal to the HTTP methods, then you can produce a RESTful system very easily with ASP.NET MVC.




回答2:


MVC has been created with REST in mind. It is REST-friendly but not 100% REST compliant, especially when it comes to content-negotiation - although you can implement it yourself on the top of MVC.




回答3:


ASP.NET MVC does promote a REST architecture.

See:

  • The REST-Like Aspect Of ASP.NET MVC - Phil Haack, Nov 2007
  • Rest For ASP.NET MVC SDK and Sample - Phil Haack, Aug 2009


来源:https://stackoverflow.com/questions/5666293/asp-net-mvc-restful-architecture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!