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

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.

主站蜘蛛池模板: 和平区| 温泉县| 兴仁县| 赤水市| 彭泽县| 东乌珠穆沁旗| 安吉县| 赤城县| 定陶县| 虹口区| 沾化县| 福鼎市| 鸡西市| 灵川县| 册亨县| 天等县| 六枝特区| 平山县| 睢宁县| 临夏县| 乌苏市| 简阳市| 聂拉木县| 托里县| 丹阳市| 噶尔县| 平度市| 淳化县| 临朐县| 馆陶县| 莫力| 淮滨县| 元谋县| 新疆| 磐石市| 炉霍县| 台湾省| 大关县| 安宁市| 红河县| 河源市|