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

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.

主站蜘蛛池模板: 富宁县| 页游| 滨海县| 夹江县| 高安市| 房产| 新乡市| 兴和县| 岑溪市| 灯塔市| 丹巴县| 稷山县| 上林县| 宁河县| 巢湖市| 乐安县| 西平县| 阜新| 漳浦县| 普安县| 娱乐| 张家港市| 长顺县| 连山| 卓尼县| 平陆县| 凌源市| 和龙市| 澄迈县| 开阳县| 新民市| 卢湾区| 丰城市| 泽州县| 土默特左旗| 安陆市| 济阳县| 天台县| 新野县| 宝山区| 张掖市|