Hacker News new | ask | show | jobs
by crooked-v 1113 days ago
With POST, you can't know at a system level if it's safe to cache the response or not.
1 comments

Cache-Control response headers?
Cache-Control and Content -Location.
insufficient
> A cached POST response can be reused to satisfy a later GET or HEAD request. In contrast, a POST request cannot be satisfied by a cached POST response because POST is potentially unsafe; see Section 4 of [CACHING].

So if you are using POST to query, you can't cache the response. You have to resort to POST/GET. With QUERY, you have idempotent requests with cacheable responses you can directly return.