@Target(METHOD) @Retention(RUNTIME) @HttpMethod("QUERY") public @interface QUERY
JAX-RS designator for the QUERY HTTP method (RFC 10008), used for safe, idempotent read operations that require a request body (e.g. JSON queries), replacing the semantic anti-pattern of using POST solely to carry a payload.

QUERY is the real, primary method for these endpoints. A POST fallback (via the X-HTTP-Method-Override: QUERY request header, see HTTPHeaders.X_HTTP_METHOD_OVERRIDE) exists on the server for network intermediaries or client libraries that cannot send QUERY directly — the fallback exists for compatibility, not the other way around.

Lives in resource-registry-api (rather than the server module) so that both the server (to annotate QUERY resource methods) and the client (to know which HTTP method a given call is semantically performing) share the same vocabulary.

Author:
Luca Frosini (ISTI - CNR)