4 ms·
Having GET requests producing side-effects is not a good idea. Idempotent or not. Should avoid. GET requests should be used to retrieve information, they're su
by rmbyrro 5y ago
Having GET requests producing side-effects is not a good idea. Idempotent or not. Should avoid.
GET requests should be used to retrieve information, they're supposed to be read-only.
At most we could record like a counter or stats about the request, but not mutate resources internally.
- zestyping 5y agoYes, agreed. I was hedging because warming a cache could be technically considered a side-effect.
- rmbyrro 5y agoI'm not sure that's the case. The resource receiving the GET request isn't producing any side effects in reality. The caching server/service in front of it is. The underlying resource (behind the cache) doesn't (shouldn't?) even know about the cache itself. And the cache doesn't mutate any data points, just may store a version of it.