What are the best/common RESTful url verbs and actions?

前端 未结 5 1300
误落风尘
误落风尘 2020-11-28 17:48

I\'m trying to find some info on the best and most common RESTful url actions.

for example, what url do you use for displaying the details of an item, for editing th

5条回答
  •  天涯浪人
    2020-11-28 18:18

    I'm going to go out on a limb and guess that you what you mean is what are standard controllers for MVC when you say "RESTful" urls, since your examples could be considered non-"RESTful" (see this article).

    Since Rails really popularized the URL style you seem to be interested in, I offer below the default controller actions produced by the ScaffoldingGenerator in Ruby on Rails. These should be familiar to anyone using a Rails application.

    The scaffolded actions and views are: index, list, show, new, create, edit, update, destroy

    Typically you would construct this as:

    http://application.com/controller//
    

提交回复
热议问题