- RESTful Web API Design with Node.js 10
- Valentin Bojinov
- 140字
- 2021-08-27 18:37:25
Reliability
Before talking about reliability, we need to define which HTTP methods are safe and which are idempotent in the REST context. So, let's first define what safe and idempotent methods are:
- An HTTP method is considered to be safe provided that, when requested, it does not modify or cause any side effects on the state of the resource
- An HTTP method is considered to be idempotent if its response stays the same, regardless of the number of times it is requested, am idempotent request always gives back the same request, if repeated identically.
The following table lists which HTTP methods are safe and which are idempotent:
| HTTP method | Safe | Idempotent |
| GET | Yes | Yes |
| POST | No | No |
| PUT | No | Yes |
| DELETE | No | Yes |
Consumers should consider operation's safety and the idempotence features in order to be served reliably.
推薦閱讀
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- 大話PLC(輕松動漫版)
- Testing with JUnit
- Python程序設(shè)計(jì)(第3版)
- 認(rèn)識編程:以Python語言講透編程的本質(zhì)
- Python Tools for Visual Studio
- Building Cross-Platform Desktop Applications with Electron
- Mastering Unity Shaders and Effects
- Android 應(yīng)用案例開發(fā)大全(第3版)
- Express Web Application Development
- Learning Apache Karaf
- Mastering ArcGIS Enterprise Administration
- Spring Boot+MVC實(shí)戰(zhàn)指南
- Secret Recipes of the Python Ninja
- Java高并發(fā)編程詳解:深入理解并發(fā)核心庫