- Building Microservices with Go
- Nic Jackson
- 86字
- 2021-07-15 17:28:08
POST
The POST method is used to create a new resource in a collection or to execute a controller. It is typically a non-idempotent action, in that multiple posts to create an element in a collection that will create multiple elements not updated after the first call.
The POST method is always used when calling controllers as the actions of this is considered non-idempotent.
Request:
POST /v1/cats HTTP/1.1
Content-Type: application/json
Content-Length: xxxx
{"name": "Felix", "weight": 5}
Response:
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 0
Location: /v1/cats/12343
推薦閱讀
- 前端跨界開發指南:JavaScript工具庫原理解析與實戰
- Linux C/C++服務器開發實踐
- arc42 by Example
- Designing Hyper-V Solutions
- Access 2010數據庫基礎與應用項目式教程(第3版)
- C語言程序設計案例式教程
- RISC-V體系結構編程與實踐(第2版)
- 零基礎Java學習筆記
- Oracle GoldenGate 12c Implementer's Guide
- JavaScript+jQuery網頁特效設計任務驅動教程
- Natural Language Processing with Python Quick Start Guide
- Photoshop智能手機APP界面設計
- Python Linux系統管理與自動化運維
- Node.js 6.x Blueprints
- Building Clouds with Windows Azure Pack