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

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.

主站蜘蛛池模板: 岐山县| 醴陵市| 五峰| 织金县| 山东省| 右玉县| 方正县| 永顺县| 南皮县| 桐城市| 海阳市| 耒阳市| 汕头市| 疏勒县| 涿州市| 海盐县| 阳谷县| 普洱| 平凉市| 德庆县| 左贡县| 安多县| 阳城县| 满洲里市| 通道| 越西县| 遂溪县| 白朗县| 西畴县| 延边| 满城县| 高邑县| 怀仁县| 渝北区| 新郑市| 营口市| 临沧市| 柏乡县| 视频| 中宁县| 青田县|