- Building Microservices with Go
- Nic Jackson
- 101字
- 2021-07-15 17:28:07
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.
推薦閱讀
- Vue.js 3.x快速入門
- Extending Jenkins
- 國際大學生程序設計競賽中山大學內部選拔真題解(二)
- Python數據可視化:基于Bokeh的可視化繪圖
- Java應用開發與實踐
- HBase從入門到實戰
- 跟小海龜學Python
- Symfony2 Essentials
- Learning Raspbian
- 單片機C語言程序設計實訓100例
- 從零開始學C語言
- Python Data Structures and Algorithms
- Learning Unreal Engine Android Game Development
- 區塊鏈項目開發指南
- SignalR:Real-time Application Development(Second Edition)