官术网_书友最值得收藏!

Controller

A controller resource is like a procedure, this is typically used when a resource cannot be mapped to standard CRUD (create, retrieve, update, and delete) functions.

The names for controllers appear as the last segment in a URI path with no child resources. If the controller requires parameters, these would typically be included in the query string:

POST /cats/1/feed           -> Feed cat 1 
POST /cats/1/feed?food=fish ->Feed cat 1 a fish

When defining a controller name we should always use a verb. A verb is a word that indicates an action or a state of being, such as feed or send.

主站蜘蛛池模板: 额敏县| 大方县| 云和县| 沈阳市| 无锡市| 诸暨市| 周宁县| 繁昌县| 德州市| 分宜县| 温宿县| 绵竹市| 仁寿县| 睢宁县| 广昌县| 海宁市| 文水县| 边坝县| 太康县| 新沂市| 若羌县| 浦北县| 兴化市| 农安县| 云阳县| 安国市| 南溪县| 伊宁县| 怀柔区| 普格县| 乐都县| 乌拉特后旗| 习水县| 柞水县| 肇源县| 星子县| 武平县| 台前县| 韶山市| 驻马店市| 苍梧县|