- Building Microservices with Go
- Nic Jackson
- 79字
- 2021-07-15 17:28:08
CRUD function names
When designing great REST URIs we never use a CRUD function name as part of the URI, instead we use a HTTP verb. For example:
DELETE /cats/1234
We do not include the verb in the name of the method as this is specified by the HTTP verb, the following URIs would be considered an anti-pattern:
GET /deleteCat/1234
DELETE /deleteCat/1234
POST /cats/1234/delete
When we look at HTTP verbs in the next section this will make more sense.
推薦閱讀
- Web程序設(shè)計及應(yīng)用
- Java面向?qū)ο笏枷肱c程序設(shè)計
- C語言程序設(shè)計實(shí)踐教程
- Flux Architecture
- Visual FoxPro程序設(shè)計
- 精通Linux(第2版)
- 編程菜鳥學(xué)Python數(shù)據(jù)分析
- PHP 7從零基礎(chǔ)到項(xiàng)目實(shí)戰(zhàn)
- Scala編程(第5版)
- Java圖像處理:基于OpenCV與JVM
- Illustrator CS6設(shè)計與應(yīng)用任務(wù)教程
- IBM RUP參考與認(rèn)證指南
- Beginning C# 7 Hands-On:The Core Language
- SaaS攻略:入門、實(shí)戰(zhàn)與進(jìn)階
- Spring Microservices