Proposals Unofficial Go proposal tracker

Add MethodQuery constant for the HTTP QUERY method

#80058 · net/http · low impact · Implemented in Go 1.28 ·

RFC 10008 defines the HTTP QUERY method. Like GET, it is safe and idempotent. Like POST, it carries a request body. This makes it useful for complex queries or large or binary query data that don't fit well in a URL. The method was previously known as SEARCH, but it was renamed before the RFC was published.

The net/http package adds a MethodQuery constant alongside MethodGet, MethodPost, MethodPatch, and the others:

const MethodQuery = "QUERY"
req, err := http.NewRequest(http.MethodQuery, "https://example.com/search", body)

The proposal only adds the constant. Any QUERY-specific behavior, such as Content-Length handling or redirects, would be handled separately.

Proposal
#80058 by nekoworks-magic
Status
Implemented on Aug 27, 2026
Release
Go 1.28
Impact
low
Area
net/http