Skip to content

Feature: HTTP QUERY method (RFC 10008) #475

Description

@EyJunge1

Feature request

Support the HTTP `QUERY` method (RFC 10008 / OpenAPI 3.2 `query:`): safe, idempotent, request body allowed.

Problem

`QUERY` is currently treated as an unknown method (`HTTP_INVALID`) and the connection is aborted. There is no `HTTP_QUERY` bit, no `stringToMethod` / `methodToString` mapping, and `AsyncCallbackJsonWebHandler` cannot be bound to QUERY.

Solution

  • Parse `QUERY` in the request line and expose `HTTP_QUERY`
  • Keep body handling method-agnostic (already the case for `Content-Length` / chunked)
  • Json handler: opt-in via `setMethod(HTTP_QUERY)` (do not add QUERY to the default GET/POST/PUT/PATCH mask)
  • Map platform `http_method::HTTP_QUERY` only when `HTTP_PARSER_HAS_QUERY` is defined (the enumerator is not a `#define`)
  • Optional: `Accept-Query` literal for RFC 10008 §3

Implementation

PR: #474

Related:

Activity

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

Metadata

Metadata

Assignees

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