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

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.

主站蜘蛛池模板: 定西市| 绥中县| 西安市| 营口市| 建宁县| 石林| 新沂市| 沙洋县| 双桥区| 资讯 | 昌吉市| 沈阳市| 玉屏| 哈巴河县| 双江| 屏山县| 十堰市| 瑞金市| 乌拉特前旗| 鄄城县| 石景山区| 合肥市| 新津县| 手游| 武宣县| 昌平区| 浦城县| 汝南县| 九龙坡区| 汪清县| 清流县| 本溪| 灵石县| 阿巴嘎旗| 乾安县| 岢岚县| 黑水县| 信宜市| 巴林左旗| 正定县| 庄浪县|