2 ms·
I understand the benefits of QUERY over GET because GET is expected to return a resource in the response. Why not just use POST though? Send a post message to a
by austin-cheney 3y ago
I understand the benefits of QUERY over GET because GET is expected to return a resource in the response. Why not just use POST though? Send a post message to a server asking to conduct a search and sending the results of that query in the response?
- gabetax 3y agoThe biggest issue I've personally experienced is semantics when wrapping your head a design or debugging a service you aren't familiar with. "POST" has come to imply a "write" operation, and mixing up the the reads and writes of a system leads to cognitive dissonance.
- dragonwriter 3y agoQUERY is the one missing method to cover all reasonable combinations of safe/idempotent/neither and whether (if safety or idempotency applies) a body needs taken into account to identify a semantically identical request. Not idempotent: POST idempotent/not safe: PUT (body matters), DELETE (no body) safe: QUERY (body matters)/GET (no body) That’s why QUERY is needed. POST is not a good substitute.