5 ms·
> The QUERY method provides a solution that spans the gap between the use of GET and POST. As with POST, the input to the query operation is passed along within
by ferdowsi 5y ago
> The QUERY method provides a solution that spans the gap between the use of GET and POST. As with POST, the input to the query operation is passed along within the payload of the request rather than as part of the request URI. Unlike POST, however, the method is explicitly safe and idempotent, allowing functions like caching and automatic retries to operate.
Is this really worth a change to every HTTP client library out there to support this? The limited applications that really need this can easily use POST and document their own semantics around this.
If anything the trend with GraphQL is to ignore HTTP verbs outright because they are limited and inexpressive beyond simple CRUD tasks.
- jonwinstanley 5y agoAgreed. Seems like a slight improvement over something that was decided and settled many years ago.
- cryptonym 5y agoPOST request caching is always tricky and often not allowed. It can also improve reliability: you can safely retry such request.
- brightstep 5y agoDefinitely. The HTTP spec has a gap that's being filled with a hack, albeit a widely accepted and implemented one. QUERY removes ambiguity, aids self-documentation of APIs, and improves caching.
- jayd16 5y agoIt also seems trivial to fallback to POST for backwards compatibility, no? I'm not sure it needs every lib to be updated before devs can gain value from this.