Skip to content

feat: add Query and MustQuery for the HTTP QUERY method (RFC 10008)#508

Open
thatwasyahya wants to merge 1 commit into
imroc:masterfrom
thatwasyahya:feat/query-method-rfc10008
Open

feat: add Query and MustQuery for the HTTP QUERY method (RFC 10008)#508
thatwasyahya wants to merge 1 commit into
imroc:masterfrom
thatwasyahya:feat/query-method-rfc10008

Conversation

@thatwasyahya

Copy link
Copy Markdown

What

Adds Query and MustQuery verb helpers for the HTTP QUERY method.

Why

RFC 10008 (Proposed Standard, June 2026) defines QUERY, a safe and idempotent method that carries the query as request content — like GET but with a body, and unlike POST it is safe, idempotent and retryable. It's a good fit for large or structured queries that don't belong in a URL.

What's added

  • Request.Query(url) — mirrors Get/Post, sending the QUERY method.
  • Request.MustQuery(url) — mirrors MustGet.

No other changes are needed: req already sends the request body for methods other than GET/HEAD/OPTIONS, so client.R().SetBody(...).Query(url) works out of the box.

Tests

Extends TestSendMethods with a QUERY case. go test ./... passes.

RFC 10008 defines QUERY, a safe and idempotent method that carries the query as request content. Query mirrors Get/Post and MustQuery mirrors MustGet. req already sends a body for non-GET/HEAD/OPTIONS methods, so SetBody(...).Query(url) works as-is. Extends TestSendMethods with a QUERY case.
Copilot AI review requested due to automatic review settings July 21, 2026 09:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants