Skip to content

Add Method::QUERY constant for the HTTP QUERY method (RFC 10008) #847

Description

@jeswr

RFC 10008 standardizes QUERY — a safe, idempotent, cacheable method carrying a request body — and registers it in the IANA HTTP Method Registry.

The http crate exposes associated constants for the standard methods (Method::GET, Method::POST, …) but not QUERY, so users have to write Method::from_bytes(b"QUERY").unwrap().

Ask: add pub const QUERY: Method, matching the existing constants and classified consistently with the crate's conventions — QUERY is safe and idempotent, so is_safe() and is_idempotent() should return true for it.

This benefits the wider ecosystem that re-exports these constants (hyper, reqwest, axum, tonic). Happy to open a PR.


Part of a broader RFC 10008 adoption effort: https://github.com/jeswr/http-query-adoption

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions