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

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.

主站蜘蛛池模板: 宁陕县| 万州区| 南部县| 满洲里市| 临朐县| 雷山县| 凤冈县| 安康市| 新津县| 九龙坡区| 辉县市| 濮阳县| 镇坪县| 射洪县| 社旗县| 辽阳市| 额敏县| 东乡族自治县| 池州市| 德清县| 交口县| 丰都县| 车险| 宜章县| 肥西县| 通许县| 庄河市| 宁武县| 兴义市| 抚宁县| 保德县| 宁蒗| 兴隆县| 南陵县| 绥棱县| 芜湖市| 林甸县| 博兴县| 陕西省| 明水县| 玉田县|