news.volyx.in

RFC 10008: The new HTTP Query Method (rfc-editor.org)

420 points by schappim · 72 days ago · 176 comments on HN

Article summary

The RFC 10008 introduces the HTTP QUERY method, which allows for safe and idempotent requests with a request body, providing an alternative to using GET or POST for queries. This method enables caching and automatic retries, making it suitable for queries that are read-only and do not modify server state. The QUERY method is designed to address issues with query string length limits and encoding overhead. It also provides a way to assign URIs to query results, allowing for later retrieval via GET requests.

Main themes

  • HTTP QUERY method
  • Idempotent requests
  • Caching and retries
  • Query string limitations
  • HTTP method alternatives
  • Request body encoding

What commenters say

  • The QUERY method provides a solution to the problem of query string length limits and encoding overhead, making it a useful alternative to GET and POST requests.
  • The idempotent nature of the QUERY method allows for caching and automatic retries, which can improve the efficiency and reliability of queries.
  • Some argue that using a hash of the request body as a URL parameter could simplify caching, while others see this as unnecessary and potentially burdensome.
  • The QUERY method is seen as a way to replace POST requests used for queries, rather than replacing GET requests with query strings, due to its idempotent and safe nature.
  • There are concerns about the potential for unbounded and user-controlled cache keys with the QUERY method, but others point out that this is already a issue with GET requests and query strings.
  • The introduction of the QUERY method is seen as a way to provide a standardized solution for queries, rather than relying on ad-hoc implementations using POST or GET requests.
  • Some argue that the benefits of the QUERY method, such as caching and retries, can be achieved through other means, such as using POST requests with appropriate headers and caching strategies.
  • The QUERY method is expected to be particularly useful for large or complex queries, such as those used in GraphQL or other query languages, where the request body can be substantial.